Bugfixes on change password
This commit is contained in:
parent
2d53aeab76
commit
4e4d18470f
|
@ -112,8 +112,8 @@ func Settings() http.HandlerFunc {
|
|||
var (
|
||||
oldPassword = r.PostFormValue("old_password")
|
||||
changeEmail = strings.TrimSpace(strings.ToLower(r.PostFormValue("change_email")))
|
||||
password1 = strings.TrimSpace(strings.ToLower(r.PostFormValue("new_password")))
|
||||
password2 = r.PostFormValue("new_password2")
|
||||
password1 = strings.TrimSpace(r.PostFormValue("new_password"))
|
||||
password2 = strings.TrimSpace(r.PostFormValue("new_password2"))
|
||||
)
|
||||
|
||||
// Their old password is needed to make any changes to their account.
|
||||
|
@ -171,6 +171,7 @@ func Settings() http.HandlerFunc {
|
|||
// Changing their password?
|
||||
if password1 != "" {
|
||||
if password2 != password1 {
|
||||
log.Error("pw1=%s pw2=%s", password1, password2)
|
||||
session.FlashError(w, r, "Couldn't change your password: your new passwords do not match.")
|
||||
} else {
|
||||
// Hash the new password.
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<p>
|
||||
If you have found content on this site that you believe to be in violation of the
|
||||
rules, please <strong>report it</strong> at TBD or e-mail
|
||||
rules, please <a href="/contact?intent=report"><strong>report it</strong></a> or e-mail
|
||||
<a href="mailto:abuse@nonshy.com">abuse@nonshy.com</a>.
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user