Merge pull request #448 from gnuheidix/admin_username

HTTP500: crashing when username is an array
This commit is contained in:
onli 2017-04-11 15:02:50 +02:00 committed by GitHub
commit 19b023529d

View File

@ -530,7 +530,7 @@ function serendipity_authenticate_author($username = '', $password = '', $is_has
}
if ($debug) fwrite($fp, date('Y-m-d H:i') . ' - Login username check:' . $username . "\n");
if ($username != '') {
if (!empty($username) && is_string($username)) {
if ($use_external) {
serendipity_plugin_api::hook_event('backend_auth', $is_hashed, array('username' => $username, 'password' => $password));
}
@ -2235,4 +2235,4 @@ function serendipity_passwordhash($cleartext_password) {
}
}
/* vim: set sts=4 ts=4 expandtab : */
/* vim: set sts=4 ts=4 expandtab : */