| ... | ... |
@@ -184,7 +184,7 @@ function addTorrent() |
| 184 | 184 |
$filename = htmlspecialchars(clean($filename)); |
| 185 | 185 |
$url = htmlspecialchars(mysql_real_escape_string($url)); |
| 186 | 186 |
|
| 187 |
- if ((strlen($hash) != 40) || !verifyHash($hash)) |
|
| 187 |
+ if ((strlen(htmlentities($_GET['hash'], ENT_QUOTES, UTF-8)) != 40) || !verifyHash($hash)) |
|
| 188 | 188 |
{
|
| 189 | 189 |
echo errorMessage() . "Error: Info hash must be exactly 40 hex bytes.</p>\n"; |
| 190 | 190 |
endOutput(); |