Statpress XSS vulnerability
-
Hi all,
i just have been made aware of a possible XSS vulnerability in the Statpress plugin. Have a look at this blog entry which describes what the problem is.
Now, i have posted a topic in the forum hosted by the author of this plugin, but would like to take the opportunity to post this here as well.
Now, the author of that blog entry suggest to “fix” the problem by downloading his “patched” version of the statpress.php file in which basically the following code has been changed:
Original Code:
$referrer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''); $userAgent = (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '');
“Patched” Code:
$referrer = (isset($_SERVER['HTTP_REFERER']) ? htmlentities($_SERVER['HTTP_REFERER']) : ''); $userAgent = (isset($_SERVER['HTTP_USER_AGENT']) ? htmlentities($_SERVER['HTTP_USER_AGENT']) : '');
#
Now my question is if the “patched” code is alright, since i am not really good at PHP, to be honest i suck when it comes to PHP ??
So any of you can tell me if the “patched” code above is ok or could mean any harm ? I would really love to continue using Statpress but am afraid because of that XSS vulnerability
- The topic ‘Statpress XSS vulnerability’ is closed to new replies.