Skip to content

Commit

Permalink
Merge pull request #426 from nanasess/improve-admin
Browse files Browse the repository at this point in the history
ADMIN_DIR のチェック強化
  • Loading branch information
okazy authored Feb 16, 2021
2 parents 392ecb8 + 3f873df commit 3695516
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions data/class/pages/admin/LC_Page_Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public function init()
$this->sendAdditionalHeader();
$this->template = MAIN_FRAME;

if (stripos($_SERVER['REQUEST_URI'], rtrim(ROOT_URLPATH.ADMIN_DIR, '/')) === false) {
// ADMIN_DIR 以外からのリクエストは認証を要求する
SC_Utils_Ex::sfIsSuccess(new SC_Session_Ex());
}

//IP制限チェック
$allow_hosts = unserialize(ADMIN_ALLOW_HOSTS);
if (is_array($allow_hosts) && count($allow_hosts) > 0) {
Expand Down

0 comments on commit 3695516

Please sign in to comment.