Skip to content

Commit

Permalink
Revert "allow password resets when using allowaccountreset and reset …
Browse files Browse the repository at this point in the history
…together #6261"

This reverts commit 8e5aa35.
  • Loading branch information
si458 committed Sep 30, 2024
1 parent 113adb5 commit 41d1f9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
const sec = parent.decryptSessionData(req.session.e);

// Check everything is ok
const allowAccountReset = ((typeof domain.passwordrequirements != 'object') || (typeof domain.passwordrequirements.reset === 'number' && domain.passwordrequirements.allowaccountreset !== false));
const allowAccountReset = ((typeof domain.passwordrequirements != 'object') || (domain.passwordrequirements.allowaccountreset !== false));
if ((allowAccountReset === false) || (domain == null) || (domain.auth == 'sspi') || (domain.auth == 'ldap') || (typeof req.body.rpassword1 != 'string') || (typeof req.body.rpassword2 != 'string') || (req.body.rpassword1 != req.body.rpassword2) || (typeof req.body.rpasswordhint != 'string') || (req.session == null) || (typeof sec.rtuser != 'string') || (typeof sec.rtpass != 'string')) {
parent.debug('web', 'handleResetPasswordRequest: checks failed');
delete req.session.e;
Expand Down

0 comments on commit 41d1f9d

Please sign in to comment.