From 0c2275222cf77bf5975a25a75ab0e50ac752bc9e Mon Sep 17 00:00:00 2001 From: kali Date: Mon, 17 Dec 2012 04:35:16 +0900 Subject: fix srp authentication cookies --- pkg/requirements.pip | 2 +- src/leap/base/auth.py | 5 ++--- 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": -- cgit v1.2.3