Commit b9fb17d 1 parent d1b4c8c commit b9fb17d Copy full SHA for b9fb17d
File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -499,6 +499,10 @@ module.exports = class User extends Model {
499
499
} )
500
500
501
501
if ( usr ) {
502
+ if ( ! usr . isActive ) {
503
+ throw new WIKI . Error . AuthAccountBanned ( )
504
+ }
505
+
502
506
await WIKI . models . users . query ( ) . patch ( {
503
507
password : newPassword ,
504
508
mustChangePwd : false
@@ -527,6 +531,9 @@ module.exports = class User extends Model {
527
531
if ( ! usr ) {
528
532
WIKI . logger . debug ( `Password reset attempt on nonexistant local account ${ email } : [DISCARDED]` )
529
533
return
534
+ } else if ( ! usr . isActive ) {
535
+ WIKI . logger . debug ( `Password reset attempt on disabled local account ${ email } : [DISCARDED]` )
536
+ return
530
537
}
531
538
const resetToken = await WIKI . models . userKeys . generateToken ( {
532
539
userId : usr . id ,
You can’t perform that action at this time.
0 commit comments