authform.py: correctly resolve relative path in form action
This commit is contained in:
parent
72b7292e57
commit
6ae398d942
|
@ -201,7 +201,11 @@ a password_field key if you want to encode a password.")
|
|||
action = auth_form.action
|
||||
|
||||
if not "://" in action:
|
||||
login_url = re.sub(r'\?.*$', '', self.login_url)
|
||||
basename = os.path.basename(self.login_url)
|
||||
if basename:
|
||||
login_url = self.login_url.split(basename)[0]
|
||||
else:
|
||||
login_url = self.login_url
|
||||
action = os.path.join(login_url, action)
|
||||
|
||||
cookies = login.cookies
|
||||
|
|
Reference in New Issue