Alexander Nicolaysen Sørnes : commentview.php: Don't allow unset or 0 versionId

Alexander Nicolaysen Sørnes asornes at winehq.org
Thu Jul 30 14:54:42 CDT 2009


Module: appdb
Branch: master
Commit: b8be6a22ce6e76489a745877fcc8c160143ac776
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=b8be6a22ce6e76489a745877fcc8c160143ac776

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Thu Jul 30 21:53:49 2009 +0200

commentview.php: Don't allow unset or 0 versionId

---

 commentview.php |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/commentview.php b/commentview.php
index 7f2e87f..e25774d 100644
--- a/commentview.php
+++ b/commentview.php
@@ -12,9 +12,15 @@ require("path.php");
 require(BASE."include/incl.php");
 require_once(BASE."include/comment.php");
 
+$iVersionId = getInput('iVersionId', $aClean);
+$iThreadId = getInput('iThreadId', $aClean);
+
+if(!$iVersionId)
+    util_show_error_page_and_exit('No versionId defined');
+
 apidb_header("Comments");
 
-Comment::view_app_comments($aClean['iVersionId'], $aClean['iThreadId']);
+Comment::view_app_comments($iVersionId, $iThreadId);
 
 apidb_footer();
 ?>




More information about the wine-cvs mailing list