summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-12-17 04:35:16 +0900
committerkali <kali@leap.se>2012-12-17 04:38:01 +0900
commit0c2275222cf77bf5975a25a75ab0e50ac752bc9e (patch)
tree49ea6585bf3d17978e8038f6b0b2d9bc98a872cc
parent5e7ca61cfd942404663e68d2d4eae062dfbc66bc (diff)
fix srp authentication cookies
-rw-r--r--pkg/requirements.pip2
-rw-r--r--src/leap/base/auth.py5
2 files changed, 3 insertions, 4 deletions
diff --git a/pkg/requirements.pip b/pkg/requirements.pip
index 5664aa5e..c573009e 100644
--- a/pkg/requirements.pip
+++ b/pkg/requirements.pip
@@ -8,7 +8,7 @@ psutil
netifaces
python-gnutls==1.1.9 # see https://bugs.launchpad.net/ubuntu/+source/python-gnutls/+bug/1027129
jsonschema
-srp
+srp>=1.0.1
pycrypto
keyring
python-dateutil
diff --git a/src/leap/base/auth.py b/src/leap/base/auth.py
index c6bd3518..ec854cf0 100644
--- a/src/leap/base/auth.py
+++ b/src/leap/base/auth.py
@@ -262,7 +262,7 @@ class SRPAuth(requests.auth.AuthBase):
def __call__(self, req):
self.authenticate()
- req.session = self.session
+ req.cookies = self.session.cookies
return req
@@ -358,9 +358,8 @@ if __name__ == "__main__":
#req = test_srp_protected_get('https://localhost:8443/1/cert')
req = test_srp_protected_get('%s/1/cert' % SERVER)
- import ipdb;ipdb.set_trace()
#print 'cert :', req.content[:200] + "..."
- print 'cert :', req.content
+ print req.content
sys.exit(0)
if action == "add":