aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-01-23 11:06:38 +0000
committermistic100 <mistic@piwigo.org>2014-01-23 11:06:38 +0000
commit18eb56efd575f2e4c021940c7187771103739ab4 (patch)
treeab3ac1c07e384f68c9c6f0c426207e917db64b11
parent9efd97f4e4a9e9ec8c7e23211e1ce23bd6381dbe (diff)
bug 3029: XSS on website_url comment form
git-svn-id: http://piwigo.org/svn/trunk@26916 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/functions_comment.inc.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/functions_comment.inc.php b/include/functions_comment.inc.php
index f14431cf7..3e0dd0f69 100644
--- a/include/functions_comment.inc.php
+++ b/include/functions_comment.inc.php
@@ -147,6 +147,7 @@ SELECT COUNT(*) AS user_exists
// website
if (!empty($comm['website_url']))
{
+ $comm['website_url'] = strip_tags($comm['website_url']);
if (!preg_match('/^https?/i', $comm['website_url']))
{
$comm['website_url'] = 'http://'.$comm['website_url'];
@@ -351,6 +352,7 @@ function update_user_comment($comment, $post_key)
// website
if (!empty($comment['website_url']))
{
+ $comm['website_url'] = strip_tags($comm['website_url']);
if (!preg_match('/^https?/i', $comment['website_url']))
{
$comment['website_url'] = 'http://'.$comment['website_url'];