Skip to content

Commit

Permalink
(BIDS-2813) fix forms on settings page (#2742)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuccaBitfly authored Dec 1, 2023
1 parent f419e7d commit 034db3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion handlers/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ func UserUpdateEmailPost(w http.ResponseWriter, r *http.Request) {
}

// check if password is correct
formPassword := r.FormValue("password")
formPassword := r.FormValue("current-password")

err = bcrypt.CompareHashAndPassword([]byte(userData.Password), []byte(formPassword))
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions templates/user/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ <h3 class="h5">Update Email</h3>
<form id="email-form" action="settings/email" method="POST">
{{ .CsrfField }}
<div class="form-group">
<label for="password">Confirm Current Password</label>
<input required type="password" minlength="5" maxlength="256" class="form-control" autocomplete="password" id="password" name="password" />
<label for="current-password">Confirm Current Password</label>
<input required type="password" minlength="5" maxlength="256" class="form-control" autocomplete="current-password" id="current-password" name="current-password" />
</div>
<div class="form-group">
<label for="email">New Email Address</label>
Expand Down

0 comments on commit 034db3e

Please sign in to comment.