From 37861510cabd3607d2e5004027ac7e3efb4a50f7 Mon Sep 17 00:00:00 2001 From: aaiyo Date: Sat, 31 Oct 2015 06:24:16 +0700 Subject: [PATCH 1/2] Update uploader.php Set cookieDomain to "" when use ip address --- core/class/uploader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/uploader.php b/core/class/uploader.php index 447d0ff..941c247 100644 --- a/core/class/uploader.php +++ b/core/class/uploader.php @@ -149,7 +149,7 @@ public function __construct() { } // COOKIES INIT - $ip = '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'; + $ip = '(25[0-5]|2[0-4][0-9]|[1]?[0-9][0-9]?)'; $ip = '/^' . implode('\.', array($ip, $ip, $ip, $ip)) . '$/'; if (preg_match($ip, $_SERVER['HTTP_HOST']) || preg_match('/^[^\.]+$/', $_SERVER['HTTP_HOST']) From b5e1b3c44f792a73f1ba463734dcc513f4f04cbb Mon Sep 17 00:00:00 2001 From: aaiyo Date: Mon, 2 Nov 2015 20:32:04 +0700 Subject: [PATCH 2/2] Update uploader.php ip address with port --- core/class/uploader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/uploader.php b/core/class/uploader.php index 941c247..f7cd653 100644 --- a/core/class/uploader.php +++ b/core/class/uploader.php @@ -150,7 +150,7 @@ public function __construct() { // COOKIES INIT $ip = '(25[0-5]|2[0-4][0-9]|[1]?[0-9][0-9]?)'; - $ip = '/^' . implode('\.', array($ip, $ip, $ip, $ip)) . '$/'; + $ip = '/^' . implode('\.', array($ip, $ip, $ip, $ip)) . '\:?(\d+)?$/'; if (preg_match($ip, $_SERVER['HTTP_HOST']) || preg_match('/^[^\.]+$/', $_SERVER['HTTP_HOST']) )