Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: CerealGuy on October 16th, 2016, 12:40 PM

Title: Low flood/spam limits are ignored
Post by: CerealGuy on October 16th, 2016, 12:40 PM
spamProtection does not handle low limits correctly.

Example #1: If $settings['search_floodcontrol_time'] is 0 (disabled, not null/undefined) this setting will be ignored and a limit of 1 will be used instead.

Example #2: If user has moderator permissions, every limit will be overridden by 2. This does trouble if the set limit is lower than 2 (for example disabled).

PR: https://github.com/Wedge/wedge/pull/40

EDIT: Merged
Title: Re: Low flood/spam limits are ignored
Post by: CerealGuy on October 21st, 2016, 05:42 PM
@Nao please have a look at https://github.com/Wedge/wedge/pull/41 don't want to open a new bug report.
Title: Re: Low flood/spam limits are ignored
Post by: Nao on October 24th, 2016, 01:18 AM
Dunno why I didn't get a github notification for that...
I've moved up the lines a bit, to avoid a useless permission check as well. Please tell me if I did it incorrectly. I was busy fixing another complex bug ;)
Title: Re: Low flood/spam limits are ignored
Post by: CerealGuy on October 24th, 2016, 10:50 PM
Looks fine and works how it should. Thanks :)