Skip to content

Commit

Permalink
ltb-project#126: Ensuring old password is required only with anonymou…
Browse files Browse the repository at this point in the history
…s password reset.
  • Loading branch information
abpai94 committed Aug 8, 2024
1 parent 38a1b8a commit b41bd1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/resetpassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
$result = "passwordrequired";
}

if (isset($_POST["oldpassword"]) and $_POST["oldpassword"]) {
$oldpassword = $_POST["oldpassword"];
} else {
if ($audit_admin === "anonymous" and !isset($_POST["oldpassword"]) and !$_POST["oldpassword"]) {
$result = "oldpasswordrequired";
} else {
$oldpassword = $_POST["oldpassword"];
}

if (isset($_POST["pwdreset"]) and $_POST["pwdreset"]) {
Expand Down

0 comments on commit b41bd1e

Please sign in to comment.