Don't show stack trace when unknown exception happens during login.

Fixes bug 951799

Change-Id: Ib012a75e5b0e1d40aab590ecc37a72c3c2ff1343
This commit is contained in:
Tres Henry 2012-03-10 12:38:38 -08:00
parent d5c438a3c8
commit a0b57a5c37
1 changed files with 6 additions and 1 deletions

View File

@ -116,7 +116,12 @@ class Login(forms.SelfHandlingForm):
exceptions.handle(request,
_('Invalid user name or password.'))
except:
exceptions.handle(request, escalate=True)
# If we get here we don't want to show a stack trace to the
# user.
exceptions.handle(request,
message=_("An error occurred authenticating."
" Please try again later."),
escalate=True)
# Unscoped token
request.session['unscoped_token'] = token.id