From ccdd3fbf96be65bcfb7975668d82270dbc4a70ca Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Thu, 5 Nov 2015 03:21:26 -0500 Subject: [PATCH] Fix minor error when Referer header not sent --- action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.php b/action.php index e9bc277bd..e9fe8d8cd 100644 --- a/action.php +++ b/action.php @@ -11,7 +11,7 @@ error_reporting(E_ALL); if (@$_GET['act'] === 'dlteam') { header("Content-Type: text/plain"); - if (substr($_SERVER['HTTP_REFERER'], 0, 32) !== 'https://play.pokemonshowdown.com') { + if (substr(@$_SERVER['HTTP_REFERER'], 0, 32) !== 'https://play.pokemonshowdown.com') { // since this is only to support Chrome on HTTPS, we can get away with a very specific referer check die("access denied"); }