diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-08-27 21:45:05 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-08-27 21:45:05 +1000 |
| commit | eb146d92015e3bfe7b2fad68dd4b8c29542a31b3 (patch) | |
| tree | 46c4a9e0ca6ba4bca57af6f3e8e34c48519ea3d0 | |
| parent | 28392a12d39a2d94f7c39adabf3c108c790ec01a (diff) | |
properly tie auth cookies to private salt
| -rw-r--r-- | inc/mod/auth.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/mod/auth.php b/inc/mod/auth.php index 6e2d3d1e..6144a17d 100644 --- a/inc/mod/auth.php +++ b/inc/mod/auth.php @@ -21,7 +21,7 @@ function mkhash($username, $password, $salt = false) { } // generate hash (method is not important as long as it's strong) - $hash = substr(base64_encode(md5($username . sha1($username . $password . $salt . ($config['mod']['lock_ip'] ? $_SERVER['REMOTE_ADDR'] : ''), true), true)), 0, 20); + $hash = substr(base64_encode(md5($username . $config['cookies']['salt'] . sha1($username . $password . $salt . ($config['mod']['lock_ip'] ? $_SERVER['REMOTE_ADDR'] : ''), true), true)), 0, 20); if (isset($generated_salt)) return Array($hash, $salt); |
