You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@warble.apache.org by hu...@apache.org on 2018/06/25 14:28:29 UTC

[incubator-warble-server] branch master updated (1ae4c55 -> 12a40b1)

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-server.git.


    from 1ae4c55  note required libs
     new 55daf52  fix shadowing and ensure cookie is always set before pages are run
     new 12a40b1  use the right connection here

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 api/plugins/session.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org


[incubator-warble-server] 02/02: use the right connection here

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-server.git

commit 12a40b1c28a3d320940d9da423c2f468e39c1ddb
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Jun 25 09:28:21 2018 -0500

    use the right connection here
---
 api/plugins/session.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/plugins/session.py b/api/plugins/session.py
index bf1e02a..ce2a2eb 100644
--- a/api/plugins/session.py
+++ b/api/plugins/session.py
@@ -96,8 +96,8 @@ class WarbleSession(object):
                         if sdoc:
                             userid = sdoc['userid']
                             if userid:
-                                sc.execute("SELECT * FROM `accounts` WHERE `userid` = ?", (userid,))
-                                doc = sc.fetchone()
+                                ac.execute("SELECT * FROM `accounts` WHERE `userid` = ?", (userid,))
+                                doc = ac.fetchone()
                         if doc:
                             # Make sure this cookie has been used in the past 7 days, else nullify it.
                             # Further more, run an update of the session if >1 hour ago since last update.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org


[incubator-warble-server] 01/02: fix shadowing and ensure cookie is always set before pages are run

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-server.git

commit 55daf528c0c77d3223eebc3a28feeb59862defd9
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Jun 25 09:27:40 2018 -0500

    fix shadowing and ensure cookie is always set before pages are run
---
 api/plugins/session.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/api/plugins/session.py b/api/plugins/session.py
index ba20291..bf1e02a 100644
--- a/api/plugins/session.py
+++ b/api/plugins/session.py
@@ -58,6 +58,7 @@ class WarbleSession(object):
         cookies['warble_session'] = cookie
         cookies['warble_session']['expires'] = 86400 * 365 # Expire one year from now
         self.headers.append(('Set-Cookie', cookies['warble_session'].OutputString()))
+        return str(cookie)
         
     def __init__(self, DB, environ, config):
         """
@@ -150,5 +151,5 @@ class WarbleSession(object):
                     self.user['userid'] = 'node:%s' % ndoc['id']
                     self.user['userlevel'] = 'robbit'
         if not cookie:
-            self.newCookie()
+            cookie = self.newCookie()
         self.cookie = cookie


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org