diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-12-09 09:26:54 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-12-09 09:26:54 +0000 |
| commit | 419f63ac5b28344142f4cfa41d66d900cdfb9c51 (patch) | |
| tree | dfda71a9e2c416c02cd835bb76c8d59da3ded3bc /roundcubemail/program/include/rcube_imap.php | |
| parent | 6c382925f2d311cc33cba43395d2d77bba1a0552 (diff) | |
- Add username and IP address to log message on unsuccessful login (#1487626)
git-svn-id: https://svn.roundcube.net/trunk@4326 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_imap.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index d1947c4a3..83c34bc3c 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -172,10 +172,14 @@ class rcube_imap } // write error log else if ($this->conn->error) { - if ($pass && $user) + if ($pass && $user) { + $message = sprintf("Login failed for %s from %s. %s", + $user, rcmail_remote_ip(), $this->conn->error); + raise_error(array('code' => 403, 'type' => 'imap', 'file' => __FILE__, 'line' => __LINE__, - 'message' => $this->conn->error), true, false); + 'message' => $message), true, false); + } } return false; |
