From 74077375e6c1909d32c80040b7d2432f0a0732cb Mon Sep 17 00:00:00 2001 From: Marek Marecki Date: Wed, 13 May 2015 22:37:41 +0200 Subject: [PATCH] Hotfix: CSRF token extraction works for older versions of Diaspora, fix #18 --- diaspy/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.25.1