File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,10 @@ public function checkPass($user, $pass)
123123 {
124124
125125 $ userdata = $ this ->selectUser ($ user );
126- if ($ userdata == false ) return false ;
126+ if ($ userdata === false ) {
127+ auth_cryptPassword ('dummy ' ); // run a crypt op to prevent timing attacks
128+ return false ;
129+ }
127130
128131 // password checking done in SQL?
129132 if ($ this ->checkConfig (['check-pass ' ])) {
Original file line number Diff line number Diff line change @@ -68,7 +68,10 @@ public function __construct()
6868 public function checkPass ($ user , $ pass )
6969 {
7070 $ userinfo = $ this ->getUserData ($ user );
71- if ($ userinfo === false ) return false ;
71+ if ($ userinfo === false ) {
72+ auth_cryptPassword ('dummy ' ); // run a crypt op to prevent timing attacks
73+ return false ;
74+ }
7275
7376 return auth_verifyPassword ($ pass , $ this ->users [$ user ]['pass ' ]);
7477 }
You can’t perform that action at this time.
0 commit comments