From 98f822f92216de29887058f12aed66a47c5784ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AE=E3=81=B6?= Date: Wed, 14 Mar 2018 17:58:08 +0900 Subject: [PATCH] =?UTF-8?q?domain=E3=82=92=E6=AF=94=E8=BC=83=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/class/util/SC_Utils.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/data/class/util/SC_Utils.php b/data/class/util/SC_Utils.php index 0c49485e46..7599f7d61e 100755 --- a/data/class/util/SC_Utils.php +++ b/data/class/util/SC_Utils.php @@ -188,12 +188,11 @@ public static function sfIsSuccess(SC_Session $objSess, $disp_error = true) // TODO 警告表示させる? // sfErrorHeader('>> referrerが無効になっています。'); } else { - $domain = SC_Utils_Ex::sfIsHTTPS() ? HTTPS_URL : HTTP_URL; - $pattern = sprintf('|^%s.*|', $domain); - $referer = $_SERVER['HTTP_REFERER']; + $domain = parse_url(HTTP_URL); + $referer = parse_url($_SERVER['HTTP_REFERER']); // 管理画面から以外の遷移の場合はエラー画面を表示 - if (!preg_match($pattern, $referer)) { + if ($domain['host'] !== $referer['host']) { if ($disp_error) SC_Utils_Ex::sfDispError(INVALID_MOVE_ERRORR); return false; }