Bug fix
authorJakob <jakob@jcornell.net>
Tue, 3 Dec 2019 05:36:14 +0000 (23:36 -0600)
committerJakob <jakob@jcornell.net>
Tue, 3 Dec 2019 05:36:14 +0000 (23:36 -0600)
auth.py

diff --git a/auth.py b/auth.py
index 74ebd312b7a833c1fc1f9ac2f48d03e4aa6ef842..2b6552cc152f02d8f366771d4764e71f01bb1c3c 100644 (file)
--- 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']