From: <var...@us...> - 2011-05-04 19:12:23
|
Revision: 8070 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8070&view=rev Author: vargenau Date: 2011-05-04 19:12:16 +0000 (Wed, 04 May 2011) Log Message: ----------- Check "rev" is a positive integer Modified Paths: -------------- trunk/lib/plugin/IncludePage.php trunk/lib/plugin/Template.php Modified: trunk/lib/plugin/IncludePage.php =================================================================== --- trunk/lib/plugin/IncludePage.php 2011-05-04 15:54:09 UTC (rev 8069) +++ trunk/lib/plugin/IncludePage.php 2011-05-04 19:12:16 UTC (rev 8070) @@ -99,6 +99,9 @@ $p = $dbi->getPage($page); if ($rev) { + if (!is_whole_number($rev) or !($rev>0)) { + return $this->error(_("Error: rev must be a positive integer.")); + } $r = $p->getRevision($rev); if ((!$r) || ($r->hasDefaultContents())) { return $this->error(sprintf(_("%s: no such revision %d."), Modified: trunk/lib/plugin/Template.php =================================================================== --- trunk/lib/plugin/Template.php 2011-05-04 15:54:09 UTC (rev 8069) +++ trunk/lib/plugin/Template.php 2011-05-04 19:12:16 UTC (rev 8070) @@ -137,6 +137,9 @@ $p = $dbi->getPage($page); if ($args['rev']) { + if (!is_whole_number($args['rev']) or !($args['rev']>0)) { + return $this->error(_("Error: rev must be a positive integer.")); + } $r = $p->getRevision($args['rev']); if ((!$r) || ($r->hasDefaultContents())) { return $this->error(sprintf(_("%s: no such revision %d."), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |