Page MenuHomePhabricator

Sending an invalid XFF header throws a QueryError
Closed, ResolvedPublic

Description

Discovered by Skizzerz:

Query: SELECT * FROM globalblocks WHERE () <br />
Function: GlobalBlocking::checkIpsForBlock<br />
Error: 1064 You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use nea
r ')' at line 1 (localhost)<br />

The function should just check that if $conds === array(), return and not bother executing the query.


Version: unspecified
Severity: normal

Details

Reference
bz59705

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:21 AM
bzimport set Reference to bz59705.
bzimport added a subscriber: Unknown Object (MLST).

Change 105636 had a related patch set uploaded by Legoktm:
Guard against no valid IPs being provided to GlobalBlocking::checkIpsForBlock

https://gerrit.wikimedia.org/r/105636

Change 105636 merged by jenkins-bot:
Guard against no valid IPs being provided to GlobalBlocking::checkIpsForBlock

https://gerrit.wikimedia.org/r/105636