Skip to content

Commit

Permalink
fix #2775 Chromeのツールインスペクタ利用時ログイン状態が継続できない問題を改善
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Sep 30, 2023
1 parent 0b27ff8 commit 3a5f5f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Baser/Controller/BcAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ protected function _checkReferer()
*/
public function render($view = null, $layout = null)
{
if(preg_match('/\.map$/', $_SERVER['REQUEST_URI'])) return 'Not Found';
if(isset($_SERVER['REQUEST_URI']) && preg_match('/\.map$/', $_SERVER['REQUEST_URI'])) return 'Not Found';
return parent::render($view, $layout);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Baser/Lib/BcUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static function loginUser($prefix = 'admin')
{
// map ファイルへのリクエストの際、PHPのセッションを書き換えてしまい
// ログイン状態が継続できなくなってしまうため処理を実行しない
if(preg_match('/\.map$/', $_SERVER['REQUEST_URI'])) return null;
if(isset($_SERVER['REQUEST_URI']) && preg_match('/\.map$/', $_SERVER['REQUEST_URI'])) return null;

$Session = new CakeSession();
$sessionKey = BcUtil::authSessionKey($prefix);
Expand Down

0 comments on commit 3a5f5f8

Please sign in to comment.