Skip to content

Commit 3379b21

Browse files
Update lib/HTTP.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sebastian Sterk <7263970+sebastiansterk@users.noreply.github.com>
1 parent 3c1eccd commit 3379b21

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/HTTP.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ public function sendUserData($user, $password) {
8888
* @return string The hashed password
8989
*/
9090
private function hashPassword($password) {
91+
if ($this->hashAlgo === false || !in_array($this->hashAlgo, hash_algos(), true)) {
92+
throw new \RuntimeException("Invalid or unsupported hash algorithm: {$this->hashAlgo}");
93+
}
9194
return hash($this->hashAlgo, $password);
9295
}
9396

0 commit comments

Comments
 (0)