File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -810,10 +810,17 @@ namespace http {
810
810
usrname = base64_decode (usrname);
811
811
int iUser = -1 ;
812
812
iUser = FindUser (usrname.c_str ());
813
- if (iUser == -1 )
813
+ if (iUser == -1 ) {
814
+ // log brute force attack
815
+ _log.Log (LOG_ERROR, " Failed login attempt for '%s' !" , usrname.c_str ());
814
816
return ;
815
- if (m_users[iUser].Password != usrpass)
817
+ }
818
+ if (m_users[iUser].Password != usrpass) {
819
+ // log brute force attack
820
+ _log.Log (LOG_ERROR, " Failed login attempt for '%s' !" , m_users[iUser].Username .c_str ());
816
821
return ;
822
+ }
823
+ _log.Log (LOG_STATUS, " Login successfull : user '%s'" , m_users[iUser].Username .c_str ());
817
824
root[" status" ] = " OK" ;
818
825
root[" title" ] = " logincheck" ;
819
826
m_pWebEm->m_actualuser = m_users[iUser].Username ;
You can’t perform that action at this time.
0 commit comments