release notes ("Update notes") for razer forge tv
[stouyapi.git] / www / push-to-my-ouya.php
index fd39043234ac4f37d876b86a0f854eeb87215c3c..ae0c44bca8816dd495952ab22569fefa9780fb64 100644 (file)
@@ -9,6 +9,8 @@
  * Maximal 30 games per IP to prevent flooding.
  *
  * @author Christian Weiske <cweiske@cweiske.de>
+ * @see    api/v1/queued_downloads.php
+ * @see    api/v1/queued_downloads_delete.php
  */
 $dbFile     = __DIR__ . '/../data/push-to-my-ouya.sqlite3';
 $apiGameDir = __DIR__ . '/api/v1/details-data/';
@@ -33,7 +35,7 @@ if (!isset($_GET['game'])) {
 }
 
 $game = $_GET['game'];
-$cleanGame = preg_replace('#[^a-zA-Z0-9.]#', '', $game);
+$cleanGame = preg_replace('#[^a-zA-Z0-9._]#', '', $game);
 if ($game != $cleanGame) {
     header('HTTP/1.0 400 Bad Request');
     header('Content-type: text/plain');
@@ -56,15 +58,6 @@ if ($ip == '') {
     echo 'Cannot detect your IP address' . "\n";
     exit(1);
 }
-if (strpos($ip, ':') !== false) {
-    header('HTTP/1.0 400 Bad Request');
-    header('Content-type: text/plain');
-    echo 'Sorry, IPv6 is not supported' . "\n";
-    echo 'This here only works if the OUYA and your PC have the same IP address,'
-        . "\n";
-    echo 'and this is definitely not the case when using IPv6' . "\n";
-    exit(1);
-}
 $ip = mapIp($ip);
 
 try {