Remove hashing of blowfish secret

New code doesn't have problems with longer secrets.

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-07-22 09:57:28 +02:00
parent d29df46b3a
commit ef03daf658
2 changed files with 2 additions and 3 deletions

View File

@ -600,8 +600,7 @@ class AuthenticationCookie extends AuthenticationPlugin
if (empty($GLOBALS['cfg']['blowfish_secret'])) {
return $this->_getSessionEncryptionSecret();
} else {
// apply md5() to work around too long secrets (returns 32 characters)
return md5($GLOBALS['cfg']['blowfish_secret']);
return $GLOBALS['cfg']['blowfish_secret'];
}
}

View File

@ -1053,7 +1053,7 @@ class AuthenticationCookieTest extends PMATestCase
$result = $method->invoke($this->object, null);
$this->assertEquals(
md5('notEmpty'),
'notEmpty',
$result
);
}