From: Jakob Date: Tue, 3 Dec 2019 05:36:14 +0000 (-0600) Subject: Bug fix X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=218719cc3e1f0e6a0e01318ecd3382afd619bb8d;p=bb-sync-api.git Bug fix --- diff --git a/auth.py b/auth.py index 74ebd31..2b6552c 100644 --- a/auth.py +++ b/auth.py @@ -308,7 +308,8 @@ class CookieAuthHandler(urllib.request.HTTPCookieProcessor): with self.parent.open(req) as resp: resp.read() - if resp.url.endswith('/webapps/login'): + path = PurePosixPath(urllib.parse.urlparse(resp.url).path) + if path.match('*/webapps/login'): log('error', "Login failed. Are your credentials correct?") del self.storage_mgr['username'] del self.stoarge_mgr['password']