From: Marek Marecki Date: Wed, 13 May 2015 20:37:41 +0000 (+0200) Subject: Hotfix: CSRF token extraction works for older versions of Diaspora, fix #18 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=74077375e6c1909d32c80040b7d2432f0a0732cb;p=diaspy.git Hotfix: CSRF token extraction works for older versions of Diaspora, fix #18 --- diff --git a/diaspy/connection.py b/diaspy/connection.py index 4a2a6e9..3a6830d 100644 --- a/diaspy/connection.py +++ b/diaspy/connection.py @@ -184,7 +184,7 @@ class Connection(): """ request = self.get('stream') token = self._token_regex.search(request.text) - if token is None: self._token_regex_2.search(request.text) + if token is None: token = self._token_regex_2.search(request.text) if token is not None: token = token.group(1) else: raise errors.TokenError('could not find valid CSRF token') self._token = token