decode URL before checking to avoid something like this: q=%2FopenFooBar which
would be converted to q=%2fopenfoobar and then blocked as 'fopen' is then found.
This happens with StatusNet 1.1.1
// Checks for worms
function isCrackerTrackerWormDetected () {
// Check against the whole list
- $GLOBALS['ctracker_checkworm'] = str_ireplace($GLOBALS['ctracker_get_blacklist'], '*', crackerTrackerQueryString());
+ $GLOBALS['ctracker_checkworm'] = str_ireplace($GLOBALS['ctracker_get_blacklist'], '*', urldecode(crackerTrackerQueryString()));
// If it differs to original and the *whole* request string is not in whitelist
// then blog the attempt
$address = $_SERVER['HTTP_CLIENT_IP'];
} elseif (isset($_SERVER['REMOTE_ADDR'])) {
// The regular address when no proxy was used
- $address = $_SERVER['REMOTE_ADDR'];
+ $address = getenv('REMOTE_ADDR');
}
// This strips out the real address from proxy output