Skip to content

Commit

Permalink
Do not include password in exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
DASPRiD committed Nov 30, 2015
1 parent 47bad9d commit a7b5075
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Encryption/AbstractEncryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,11 @@ private function encodePassword($password)
restore_error_handler();

if (false === $encodedPassword) {
throw new UnsupportedPasswordException(sprintf(
'The password "%s" contains non-latin-1 characters',
$password
));
throw new UnsupportedPasswordException('Password contains non-latin-1 characters');
}

if (strlen($encodedPassword) > 32) {
throw new UnsupportedPasswordException(sprintf(
'The password "%s" is longer than 32 characters',
$password
));
throw new UnsupportedPasswordException('Password is longer than 32 characters');
}

return $encodedPassword;
Expand Down

0 comments on commit a7b5075

Please sign in to comment.