* Added new event hook 'backend_loginfail' to track failed logins
(serendipity_event_externalauth can make use of it for fail2ban)
This commit is contained in:
parent
272e55b943
commit
187941aac6
@ -3,6 +3,9 @@
|
||||
Version 1.6 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Added new event hook 'backend_loginfail' to track failed logins
|
||||
(serendipity_event_externalauth can make use of it for fail2ban)
|
||||
|
||||
* Fixed a bug in synchronizing new files with the same basename
|
||||
but different extensions, where files with the same mimetype
|
||||
would not get added (garvinhicking)
|
||||
|
@ -384,6 +384,7 @@ function serendipity_login($use_external = true) {
|
||||
if (empty($serendipity['POST']['auto'])) {
|
||||
serendipity_deleteCookie('author_information');
|
||||
serendipity_deleteCookie('author_information_iv');
|
||||
|
||||
return false;
|
||||
} else {
|
||||
serendipity_issueAutologin(
|
||||
@ -397,6 +398,9 @@ function serendipity_login($use_external = true) {
|
||||
} elseif (isset($serendipity['COOKIE']['author_information'])) {
|
||||
$cookie = serendipity_checkAutologin($serendipity['COOKIE']['author_information'], $serendipity['COOKIE']['author_information_iv']);
|
||||
|
||||
$data = array('ext' => $use_external, 'mode' => 1, 'user' => $cookie['username'], 'pass' => $cookie['password']);
|
||||
serendipity_plugin_api::hook_event('backend_loginfail', $data);
|
||||
|
||||
if (is_array($cookie) && serendipity_authenticate_author($cookie['username'], $cookie['password'], false, $use_external)) {
|
||||
return true;
|
||||
} else {
|
||||
@ -405,6 +409,9 @@ function serendipity_login($use_external = true) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$data = array('ext' => $use_external, 'mode' => 2, 'user' => $serendipity['POST']['user'], 'pass' => $serendipity['POST']['pass']);
|
||||
serendipity_plugin_api::hook_event('backend_loginfail', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user