projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0a8a2b
)
Don't crash when unauthenticated users try to change password
author
Magnus Hagander
<magnus@hagander.net>
Mon, 28 Aug 2017 15:07:58 +0000
(17:07 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Mon, 28 Aug 2017 15:07:58 +0000
(17:07 +0200)
pgweb/account/views.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/account/views.py
b/pgweb/account/views.py
index d9b9152e6b1e9fa059673c4536e2c3c7b451e417..d282e9ff5b50af2f50dd2fc6e470e727d253180c 100644
(file)
--- a/
pgweb/account/views.py
+++ b/
pgweb/account/views.py
@@
-226,7
+226,7
@@
def logout(request):
return authviews.logout_then_login(request, login_url='/')
def changepwd(request):
- if request.user.password == OAUTH_PASSWORD_STORE:
+ if
hasattr(request.user, 'password') and
request.user.password == OAUTH_PASSWORD_STORE:
return HttpServerError("This account cannot change password as it's connected to a third party login site.")
log.info("Initiating password change from {0}".format(get_client_ip(request)))