Commit 68542634 authored by Xavier Guimard's avatar Xavier Guimard

Check pwdnew=pwdconfirm even if old pwd is not required

Closes: #1547
parent 24568c0b
......@@ -34,6 +34,10 @@ sub _modifyPassword {
return PE_OK
unless ( $req->data->{newpassword} = $req->param('newpassword') );
# Verify that old password is good
return PE_PASSWORD_MISMATCH
unless ( $req->data->{newpassword} eq $req->param('confirmpassword') );
# Check if portal require old password
if ( $self->conf->{portalRequireOldPassword} ) {
......@@ -43,11 +47,6 @@ sub _modifyPassword {
return PE_PP_MUST_SUPPLY_OLD_PASSWORD;
}
# Verify that old password is good
return PE_PASSWORD_MISMATCH
unless (
$req->data->{newpassword} eq $req->param('confirmpassword') );
# Verify old password
return PE_BADOLDPASSWORD
unless ( $self->confirm( $req, $req->data->{oldpassword} ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment