Fix minor error when Referer header not sent

This commit is contained in:
Guangcong Luo
2015-11-05 03:21:26 -05:00
parent 53dc1a1f71
commit ccdd3fbf96

View File

@@ -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");
}