Browse code

Continuation of reviewing filtering practices

Clarissa Walker authored on 2015/09/14 07:16:10
Showing 1 changed files
... ...
@@ -118,7 +118,7 @@ if (isset($_FILES["zipfile"]) && $_FILES["zipfile"]["error"] != 4 && isset($_FIL
118 118
 					$filename = stripslashes($filename);
119 119
 					$filename = clean($filename);
120 120
 				
121
-					if ((strlen($hash) != 40) || !verifyHash($hash))
121
+					if ((strlen(htmlentities($_GET['hash'], ENT_QUOTES, UTF-8)) != 40) || !verifyHash($hash))
122 122
 					{
123 123
 						echo errorMessage() . "Error: Info hash must be exactly 40 hex bytes.</p>\n";
124 124
 						$error_status = false;