improved check quality
!empty verifies that $username has been set with a significant value of any kind; is_string makes sure the type is really what is being expected in the following code.
This commit is contained in:
parent
e28bbf04d2
commit
3a7e04c69c
@ -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 ($debug) fwrite($fp, date('Y-m-d H:i') . ' - Login username check:' . $username . "\n");
|
||||||
if ($username != '' && is_string($username)) {
|
if (!empty($username) && is_string($username)) {
|
||||||
if ($use_external) {
|
if ($use_external) {
|
||||||
serendipity_plugin_api::hook_event('backend_auth', $is_hashed, array('username' => $username, 'password' => $password));
|
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 : */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user