浏览代码

Update check_auth.php

FusionPBX 8 年之前
父节点
当前提交
ccd1ad83ad
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      resources/check_auth.php

+ 1 - 1
resources/check_auth.php

@@ -46,7 +46,7 @@
 	if (!isset($_SESSION['template_content'])) { $_SESSION["template_content"] = null; }
 
 //if the username is not provided then send to login.php
-	if (strlen($_REQUEST["username"]) == 0 && strlen($_REQUEST["key"]) == 0) {
+	if (strlen($_SESSION['username']) == 0 && strlen($_REQUEST["username"]) == 0 && strlen($_REQUEST["key"]) == 0) {
 		$target_path = ($_REQUEST["path"] != '') ? $_REQUEST["path"] : $_SERVER["REQUEST_URI"];
 		header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($target_path));
 		exit;