本文整理匯總了PHP中ConfService::getDeclaredUnsecureActions方法的典型用法代碼示例。如果您正苦於以下問題:PHP ConfService::getDeclaredUnsecureActions方法的具體用法?PHP ConfService::getDeclaredUnsecureActions怎麽用?PHP ConfService::getDeclaredUnsecureActions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ConfService
的用法示例。
在下文中一共展示了ConfService::getDeclaredUnsecureActions方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: strpos
}
}
$action = "ping";
if (preg_match('/MSIE 7/', $_SERVER['HTTP_USER_AGENT']) || preg_match('/MSIE 8/', $_SERVER['HTTP_USER_AGENT'])) {
$action = "get_boot_gui";
} else {
$action = strpos($_SERVER["HTTP_ACCEPT"], "text/html") !== false ? "get_boot_gui" : "ping";
}
if (isset($_GET["action"]) || isset($_GET["get_action"])) {
$action = isset($_GET["get_action"]) ? $_GET["get_action"] : $_GET["action"];
} else {
if (isset($_POST["action"]) || isset($_POST["get_action"])) {
$action = isset($_POST["get_action"]) ? $_POST["get_action"] : $_POST["action"];
}
}
$pluginsUnSecureActions = ConfService::getDeclaredUnsecureActions();
$unSecureActions = array_merge($pluginsUnSecureActions, array("get_secure_token"));
if (!in_array($action, $unSecureActions) && AuthService::getSecureToken()) {
$token = "";
if (isset($_GET["secure_token"])) {
$token = $_GET["secure_token"];
} else {
if (isset($_POST["secure_token"])) {
$token = $_POST["secure_token"];
}
}
if ($token == "" || !AuthService::checkSecureToken($token)) {
throw new Exception("You are not allowed to access this resource.");
}
}
if (AuthService::usersEnabled()) {