1
0
mirror of https://github.com/til-schneider/slim-wiki.git synced 2025-08-09 18:16:38 +02:00

Removed comma-part from generated password salt

This commit is contained in:
til-schneider
2016-05-25 09:40:35 +02:00
parent d81da7a120
commit 02422904aa

View File

@@ -131,7 +131,7 @@ class EditorService {
public function createUserConfig($user, $pass) { public function createUserConfig($user, $pass) {
$type = 'sha256'; $type = 'sha256';
$salt = uniqid(mt_rand(), true); $salt = uniqid(mt_rand());
$hash = hash($type, $pass . $salt); $hash = hash($type, $pass . $salt);
return "\$config['user.".strtolower($user)."'] = array('type' => '$type', 'salt' => '$salt', 'hash' => '$hash');"; return "\$config['user.".strtolower($user)."'] = array('type' => '$type', 'salt' => '$salt', 'hash' => '$hash');";