mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
Return error if confirm_password is filled but not new_password
(imported from commit c58ca8d2f5592c4cf062b963f3cca6673242419e)
This commit is contained in:
parent
f276ad2dce
commit
3763dca4a6
@ -885,7 +885,7 @@ def json_change_settings(request, user_profile, full_name=POST,
|
||||
# because browsers POST nothing for an unchecked checkbox
|
||||
enable_desktop_notifications=POST(converter=lambda x: x == "on",
|
||||
default=False)):
|
||||
if new_password != "":
|
||||
if new_password != "" or confirm_password != "":
|
||||
if new_password != confirm_password:
|
||||
return json_error("New password must match confirmation password!")
|
||||
if not authenticate(username=user_profile.user.email, password=old_password):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user