Commit 252c35c6 authored by Joshua Tauberer's avatar Joshua Tauberer

Merge pull request #772 from yodax/generic-login-message

Make control panel login failed messages generic - don't reveal if an email address has an account on the system.
parents 1e1c3cbd f292e8fc
...@@ -43,7 +43,7 @@ def authorized_personnel_only(viewfunc): ...@@ -43,7 +43,7 @@ def authorized_personnel_only(viewfunc):
except ValueError as e: except ValueError as e:
# Authentication failed. # Authentication failed.
privs = [] privs = []
error = str(e) error = "Incorrect username or password"
# Authorized to access an API view? # Authorized to access an API view?
if "admin" in privs: if "admin" in privs:
...@@ -119,7 +119,7 @@ def me(): ...@@ -119,7 +119,7 @@ def me():
except ValueError as e: except ValueError as e:
return json_response({ return json_response({
"status": "invalid", "status": "invalid",
"reason": str(e), "reason": "Incorrect username or password",
}) })
resp = { resp = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment