Revert "allow password resets when using allowaccountreset and reset together #6261"
This reverts commit 8e5aa35bf3ba169611a074b24a32cf944264f443.
si458 committed
Sep 30, 2024 at 17:30 UTC
41d1f9d26f8b34f54abcfbb4c32642aad2129475
1 file changed
+1
-1
webserver.js
+1
-1
@@ -1635,7 +1635,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
1635
const sec = parent.decryptSessionData(req.session.e);
1636
1637
// Check everything is ok
1638
- const allowAccountReset = ((typeof domain.passwordrequirements != 'object') || (typeof domain.passwordrequirements.reset === 'number' && domain.passwordrequirements.allowaccountreset !== false));
1638
+ const allowAccountReset = ((typeof domain.passwordrequirements != 'object') || (domain.passwordrequirements.allowaccountreset !== false));
1639
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')) {
1640
parent.debug('web', 'handleResetPasswordRequest: checks failed');
1641
delete req.session.e;