Skip to content

Commit aefe695

Browse files
author
Andres Campanario
committed
change user not found message returned to prevent enumeration attack
1 parent c1fa7ea commit aefe695

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Controller/Traits/PasswordManagementTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function changePassword($id = null)
120120
}
121121
}
122122
} catch (UserNotFoundException $exception) {
123-
$this->Flash->error(__d('cake_d_c/users', 'User was not found'));
123+
$this->Flash->error(__d('cake_d_c/users', 'User was not found 1'));
124124
} catch (WrongPasswordException $wpe) {
125125
$this->Flash->error($wpe->getMessage());
126126
} catch (Exception $exception) {
@@ -175,7 +175,7 @@ public function requestResetPassword()
175175

176176
return $this->redirect(['action' => 'login']);
177177
} catch (UserNotFoundException $exception) {
178-
$this->Flash->error(__d('cake_d_c/users', 'User {0} was not found', $reference));
178+
$this->Flash->error(__d('cake_d_c/users', 'If the account is valid, the system will send an instructional email to the address on record.'));
179179
} catch (UserNotActiveException $exception) {
180180
$this->Flash->error(__d('cake_d_c/users', 'The user is not active'));
181181
} catch (Exception $exception) {

0 commit comments

Comments
 (0)