No Support => Feature requests => Topic started by: 406man on June 21, 2012, 01:44:08 pm

Title: [Done] Logging Request
Post by: 406man on June 21, 2012, 01:44:08 pm
Several of the users of my gallery have had problems due to being banned. On the face of it, there’s no reason for them to have been banned and the Bans part of the admin interface shows the ban not being in effect. But they still can’t log in.  Unfortunately I can’t gather sufficient information to be confirm that there is a problem with Coppermine rather than the users having finger trouble.

So what I’m requesting – this is a feature request, not a request for support – is more logging related to bans. For example, an entry in the log file every time a user does something  that will contribute towards a ban. It should have the date, time, IP address and username. Also an entry when the user tries to log in even though they are banned. Again containing date, time, IPaddress and username.
Title: Re: Logging Request
Post by: Αndré on June 21, 2012, 03:00:08 pm
The security log currently looks like
Jun 21, 2012 at 12:49 PM - Failed login attempt with Username: test

so we just need to add the IP address like it's done here:
Jun 21, 2012 at 12:52 PM - Denied privileged access to admin.php by user Guest at IP

You can apply that change immediately. Open login.php, find
Code: [Select]
log_write("Failed login attempt with Username: " . $superCage->post->getEscaped('username'), CPG_SECURITY_LOG);and replace with
Code: [Select]
log_write("Failed login attempt at IP $hdr_ip with Username: " . $superCage->post->getEscaped('username'), CPG_SECURITY_LOG);
As far as I know failed login attempts are the only way to ban yourself.
Title: Re: Logging Request
Post by: Αndré on May 16, 2013, 11:15:39 am
Committed change in SVN revision 8568.