get can return the empty string, check for that.

While the credential checks were correctly failing when salt was the
empty string, it was giving confusing i.e., no log messages.
This commit is contained in:
Andrew Ruthven 2022-12-19 23:06:04 +13:00
parent 0b709c791d
commit ee26ee730f

View File

@ -458,7 +458,7 @@ class HTTPAuthSession {
$salt = $cache->get($cache_ns, 'salt');
if (isset($salt)) {
if (isset($salt) && $salt != '') {
$sha1_sent = session_salted_sha1($password, $salt);
$cached_credentials = $cache->get($cache_ns, $sha1_sent);