Version 0.8.3 ()
------------------------------------------------------------------------
+ * Fixed possible XSS in comment input validation, thanks to
+ Ilia Alshanetsky
+
* XML_RPC: Eliminate path disclosure vulnerabilities by suppressing
error messages when eval()'ing. Eliminate path disclosure
vulnerability by catching bogus parameters submitted
if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://' && substr($comment['url'], 0, 8) != 'https://') {
$comment['url'] = 'http://' . $comment['url'];
}
-
+
+ if (!empty($comment['url'])) {
+ if (!@parse_url($comment['url'])) {
+ $comment['url'] = '';
+ }
+ $comment['url'] = htmlspecialchars($comment['url'], ENT_QUOTES);
+ }
+
serendipity_plugin_api::hook_event('frontend_display', $comment);
if (isset($comment['no_email']) && $comment['no_email']) {