aboutsummaryrefslogtreecommitdiffstats
path: root/comments.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-10-16 00:38:26 +0000
committerrvelices <rv-github@modusoptimus.com>2008-10-16 00:38:26 +0000
commitebc3c2e2f7d9408db7e5335d63fdd2a003c3d79a (patch)
treed2b00fb200eab5f807b6eac33e8e692031227a1b /comments.php
parenteb667c7711d61d0c757f2202af6c2e61cba7d1ac (diff)
merge 2755 and 2756 from branch 2.0 to trunk
- 2755 fix vulnerability http://www.milw0rm.com/exploits/6755 - 2756 security paranoia: protect session/remember me cookies from XSS attacks (works only if php>=5.2 and with IE/FF maybe others) git-svn-id: http://piwigo.org/svn/trunk@2757 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'comments.php')
-rw-r--r--comments.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/comments.php b/comments.php
index 555986328..3db7485c8 100644
--- a/comments.php
+++ b/comments.php
@@ -65,7 +65,7 @@ $page['since'] = isset($_GET['since']) ? $_GET['since'] : 4;
//
$page['sort_by'] = 'date';
// if the form was submitted, it overloads default behaviour
-if (isset($_GET['sort_by']))
+if (isset($_GET['sort_by']) and isset($sort_by[$_GET['sort_by']]) )
{
$page['sort_by'] = $_GET['sort_by'];
}
@@ -74,7 +74,7 @@ if (isset($_GET['sort_by']))
//
$page['sort_order'] = 'DESC';
// if the form was submitted, it overloads default behaviour
-if (isset($_GET['sort_order']))
+if (isset($_GET['sort_order']) and isset($sort_order[$_GET['sort_order']]))
{
$page['sort_order'] = $_GET['sort_order'];
}