Merge pull request #340 from dzaikos/master
Added syslog reporting for failed API login attempts.
This commit is contained in:
commit
9113e738c9
1 changed files with 1 additions and 0 deletions
|
@ -77,6 +77,7 @@ class API extends Handler {
|
||||||
$this->wrap(self::STATUS_OK, array("session_id" => session_id(),
|
$this->wrap(self::STATUS_OK, array("session_id" => session_id(),
|
||||||
"api_level" => self::API_LEVEL));
|
"api_level" => self::API_LEVEL));
|
||||||
} else { // else we are not logged in
|
} else { // else we are not logged in
|
||||||
|
user_error("Failed login attempt for $login from {$_SERVER['REMOTE_ADDR']}", E_USER_WARNING);
|
||||||
$this->wrap(self::STATUS_ERR, array("error" => "LOGIN_ERROR"));
|
$this->wrap(self::STATUS_ERR, array("error" => "LOGIN_ERROR"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue