admin.php: fix authentication bypass vulnerability
An attacker ban bypass the authentication form by passing an array instead of a string (https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet#Input_handling). The identity operator should fix the vulnerability.
See merge request !13
/* Check classic admin password authentification. */
if (isset ($_POST['admin_password']) && empty($cfg['admin_http_auth_user']))
{
- if (strcmp ($cfg['admin_password'], $_POST['admin_password']) == 0)
+ if ($cfg['admin_password'] === $_POST['admin_password'])
$_SESSION['admin_auth'] = true;
else
{