mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
Merge pull request #323 from tdh62/php8
fix announce.php , use $GLOBALS array in the loop
This commit is contained in:
@@ -19,7 +19,7 @@ foreach (array("port","downloaded","uploaded","left","compact","no_peer_id") as
|
||||
}
|
||||
//check info_hash, peer_id and passkey
|
||||
foreach (array("info_hash","peer_id","port","downloaded","uploaded","left") as $x)
|
||||
if (!isset($x)) warn("Missing key: $x");
|
||||
if (!isset($GLOBALS[$x])) warn("Missing key: $x");
|
||||
foreach (array("info_hash","peer_id") as $x)
|
||||
if (strlen($GLOBALS[$x]) != 20) warn("Invalid $x (" . strlen($GLOBALS[$x]) . " - " . rawurlencode($GLOBALS[$x]) . ")");
|
||||
if (isset($passkey) && strlen($passkey) != 32) warn("Invalid passkey (" . strlen($passkey) . " - $passkey)");
|
||||
|
||||
Reference in New Issue
Block a user