A couple of questions: Isn’t a 255-character limit a little arbitrary? The allowable limit for URLs is much higher than that.
But maybe it fails because of this: blockbadqueries.php is looking for a REQUEST_URI of greater than 255 characters. But the REQUEST_URI is the portion after the domain name. The Ultimate Security Checker test is only generating a query string 250 characters long:
‘long’ -> $this->gen_random_string(250),
So when tested against the 255 value the URL generated by the test won’t it always pass, because it’s going to be at most 252 characters long?
But that’s not it; I tried some URLs that are supposed to be trapped (after logging off my admin account):
https://this.blogs.com/?12341234base640-982321
https://this.blogs.com/?12341234base640-982321eval(xyzz);f4
https://this.blogs.com/?eval(CONCAT(this+that))
In each case, my server cheerfully returned a “200” server response. So is the problem with the blockbadqueries.php plugin itself?
Is the $user_ID defined? Do the guys with black hats have one? If not, then it doesn’t even run the test. Same with current_user_can — what if there is no “current user”?
When I commented out the tests for the existence of $user_ID and the ‘level_10’ access, bingo: my test URLs successfully failed, as it were.