Refactor SettingsSetPassword and PasswordManager to enhance password handling and validate UUID format
https://github.com/nosial/Socialbox-PHP/issues/66
This commit is contained in:
parent
c3b1ee799a
commit
d127393402
2 changed files with 6 additions and 10 deletions
|
@ -63,11 +63,15 @@
|
|||
{
|
||||
$peerUuid = $peerUuid->getUuid();
|
||||
}
|
||||
elseif(!Validator::validateUuid($peerUuid))
|
||||
{
|
||||
throw new InvalidArgumentException('The given internal peer UUID is not a valid UUID V4');
|
||||
}
|
||||
|
||||
// Throws an exception if the hash is invalid
|
||||
if(!Cryptography::validatePasswordHash($hash))
|
||||
{
|
||||
throw new CryptographyException('Invalid password hash');
|
||||
throw new CryptographyException('Invalid password aragon2id hash');
|
||||
}
|
||||
|
||||
$encryptionKey = Configuration::getCryptographyConfiguration()->getRandomInternalEncryptionKey();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue