diff options
| -rw-r--r-- | pkg/requirements.pip | 2 | ||||
| -rw-r--r-- | src/leap/base/auth.py | 14 | 
2 files changed, 3 insertions, 13 deletions
| diff --git a/pkg/requirements.pip b/pkg/requirements.pip index 49b56274..d7dc2c91 100644 --- a/pkg/requirements.pip +++ b/pkg/requirements.pip @@ -2,7 +2,7 @@  # do not change it, we will freeze the requirements before tagging a release.  argparse # only for python 2.6 -requests +requests<1.0.0   ping  psutil  netifaces diff --git a/src/leap/base/auth.py b/src/leap/base/auth.py index ec854cf0..ecc24179 100644 --- a/src/leap/base/auth.py +++ b/src/leap/base/auth.py @@ -142,9 +142,6 @@ class SRPAuth(requests.auth.AuthBase):          self.init_srp() -    def get_json_data(self, response): -        return json.loads(response.content) -      def init_srp(self):          usr = srp.User(              self.username, @@ -175,8 +172,7 @@ class SRPAuth(requests.auth.AuthBase):              raise SRPAuthenticationError(                  "No valid response (salt).") -        # XXX should  get auth_result.json instead -        self.init_data = self.get_json_data(init_session) +        self.init_data = init_session.json          return self.init_data      def get_server_proof_data(self): @@ -194,13 +190,7 @@ class SRPAuth(requests.auth.AuthBase):              raise SRPAuthenticationError(                  "No valid response (HAMK).") -        # XXX should  get auth_result.json instead -        try: -            self.auth_data = self.get_json_data(auth_result) -        except ValueError: -            raise SRPAuthenticationError( -                "No valid data sent (HAMK)") - +        self.auth_data = auth_result.json          return self.auth_data      def authenticate(self): | 
