mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 15:19:06 +00:00
Fixed login error when email have space character
This commit is contained in:
@@ -80,7 +80,7 @@ def login(request, template_name='registration/login.html',
|
||||
# password is valid, log user in
|
||||
return log_user_in(request, form.get_user(), redirect_to)
|
||||
else:
|
||||
username = request.REQUEST.get('username', '')
|
||||
username = request.REQUEST.get('username', '').strip()
|
||||
failed_attempt = cache.get(LOGIN_ATTEMPT_PREFIX+username, 1)
|
||||
if failed_attempt >= settings.LOGIN_ATTEMPT_LIMIT:
|
||||
form = CaptchaAuthenticationForm()
|
||||
|
Reference in New Issue
Block a user