Banned: Bad IP as Admin -bug found?
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexHelp
Author Message
layingback
Forum Admin


Joined: Apr 19, 2004
Posts: 953

PostPost subject: Banned: Bad IP as Admin -bug found?
Posted: Thu Dec 24, 2009 7:55 am
Reply with quote

I was banned from a new site yesterday due to bad ip - flooding, when I was Admin! I know this is not _supposed_ to happen, but it did, and there were no warning messages for flooding. I was in maintenance mode too - so rather messy fixing things!

But it had happened to me once before, a long time ago, so I went looking. I think I found the cause of admins banning themselves.

Symptoms were that I was using site without problem as user & admin, logged out as admin, went to log straight back in and got Banned: Bad Bot screen. Entry in db showing my IP was for both banned and flooding.

What I think the code does is call Security twice, the second time with membership details. If user is admin, 2nd call gets skipped, so admins don't get banned no matter how fast they click, but the flood action still gets logged from 1st call. So I suspect that if you log out of admin during a logged flooding sequence, the next click - when you are no longer an admin - gets you banned immediately, because the flood count indicates that you already received the warnings (which you didn't actually because you were admin at the time).

Thoughts? Looking for confirmation from the knowledgeable, then if confirmed I'll log as bug.

_________________
Pro_News: The complete module for Dragonfly - now available as version 3.3

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
Back to top
View user's profile Visit poster's website
Dizfunkshunal
Platinum Supporter


Joined: Mar 23, 2006
Posts: 2079

PostPost subject: Re: Banned: Bad IP as Admin -bug found?
Posted: Thu Dec 24, 2009 3:42 pm
Reply with quote

Sounds like it is working like it was made to. I add all my static ips to the IPs Shield so i dont get banned when i go from admin to reg user to check my work. I get banned easy on any DF site with flood active. Only downfall to having business class internet sometimes its just to fast. Smile
_________________
Diz Web Design Status: Open (Use of resources requires registration.)

Dizfunkshunal's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Multiple Setups
Back to top
View user's profile Send e-mail Visit poster's website Yahoo Messenger
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: Banned: Bad IP as Admin -bug found?
Posted: Sat Dec 26, 2009 5:51 am
Reply with quote

A slower delay its in cvs from few weeks already.

Yes there is a glitch with maintenance on, I do have an "ugly' patch already but never committed.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: Banned: Bad IP as Admin -bug found?
Posted: Mon Dec 28, 2009 3:12 am
Reply with quote

I need to add that this glitch may exists only on freshly installed websites, right after the session ends (closing the browser or log out).

I never had a fix but a workaround exists and I want this to be reviewed before it gets released.

layingback yes, a bug report is welcome.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
layingback
Forum Admin


Joined: Apr 19, 2004
Posts: 953

PostPost subject: Re: Banned: Bad IP as Admin -bug found?
Posted: Mon Dec 28, 2009 10:15 am
Reply with quote

Bug report #1109 submitted.

Thanks for reply Nano. I couldn't think of a straightforward way to prevent. Really need to flush existing list of flood entries for admin at logout, but means a lot of special code for a rather special case.

Work around is obviously to pause for 30 secs between admin logout and log back in, but when you've just logged out but forgotten to turn off Maintenance mode, the urge to quickly log back in is just too great Wink

_________________
Pro_News: The complete module for Dragonfly - now available as version 3.3

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexHelp All times are GMT
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

stopsoftwarepatents.eu petition banner
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.4273 seconds with 19 DB Queries in 0.0338 seconds
Memory Usage: 2.89 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy