Hi there folks!
I've got an issue. A popular method of getting by the filename matches on blacklists is for bots scanning for common applications to use multiple slashes. For instance:
http://domain.com//////////wp-login.php
because it borks the parse_url function, returning a null result, which then causes the filecheck to fail.
I've seen anywhere from two to 6 slashes by the bots. Initially, when I was seeing just two or three, I handled it by looking for the grouping and then replacing it with a single slash:
$url = str_replace('///', '/', $url);
$url = str_replace('//', '/', $url);
But I'm tired of screwing with them. If they use 137 slashes, I want to replace it with a single, so the parse_url function doesn't choke up. Could someone help me figure out how I might do that?
Thanks for your time!