misc: always include trailing slash in login URI (#15241)
This commit is contained in:
parent
fbf8f8b145
commit
53527eb0c1
|
@ -50,7 +50,7 @@ def test_register_account(pub):
|
|||
assert 'register'in resp.body
|
||||
resp = resp.click('New Account page')
|
||||
resp.form['username'] = 'foobar'
|
||||
assert resp.form.submit().location == 'http://example.net/login'
|
||||
assert resp.form.submit().location == 'http://example.net/login/'
|
||||
assert PasswordAccount.count() == 2
|
||||
assert pub.user_class.count() == 2
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ def do_user_registration(pub, username='foo', password='bar'):
|
|||
register_form['password$pwd2'] = password
|
||||
resp = register_form.submit()
|
||||
assert resp.status_int == 302
|
||||
assert resp.location == 'http://example.net/login'
|
||||
assert resp.location == 'http://example.net/login/'
|
||||
|
||||
assert pub.user_class.count() == initial_user_count + 1
|
||||
assert PasswordAccount.count() == initial_account_count + 1
|
||||
|
|
|
@ -442,7 +442,7 @@ class MethodDirectory(Directory):
|
|||
tmp = self.login_submit_account_user(account, user)
|
||||
if tmp:
|
||||
return tmp
|
||||
return redirect('login')
|
||||
return redirect('login/')
|
||||
|
||||
template.html_top(_('Password Change'))
|
||||
get_request().form = {}
|
||||
|
@ -476,7 +476,7 @@ class MethodDirectory(Directory):
|
|||
else:
|
||||
pass # XXX: user has no email, what to tell him ?
|
||||
|
||||
return redirect('login')
|
||||
return redirect('login/')
|
||||
|
||||
def forgotten_token_end_page(self):
|
||||
r = TemplateIO(html=True)
|
||||
|
@ -622,7 +622,7 @@ class MethodDirectory(Directory):
|
|||
user.email, fire_and_forget = True)
|
||||
|
||||
# XXX: display a message instead of immediate redirect ?
|
||||
return redirect(get_publisher().get_root_url() + 'login')
|
||||
return redirect(get_publisher().get_root_url() + 'login/')
|
||||
|
||||
def moderation_notification(self):
|
||||
template.html_top(_('Account created, waiting for moderation'))
|
||||
|
|
Loading…
Reference in New Issue