From b62b0b9b299afda455230819cd9ce831db2ce544 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Tue, 9 May 2017 21:54:43 +0200 Subject: [PATCH] Fix regression: ajax calls require authentication with public access --- auth.php | 2 +- client/index.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/auth.php b/auth.php index f69c6c3..ed7db2e 100755 --- a/auth.php +++ b/auth.php @@ -39,7 +39,7 @@ if ($force_login) { $user = new uUser(); $user->getFromSession(); -if (!$user->isValid && (uConfig::$require_authentication || defined('headless'))) { +if (!$user->isValid && (uConfig::$require_authentication || defined('client'))) { /* authentication */ $login = (isset($_REQUEST['user']) ? $_REQUEST['user'] : NULL); $pass = (isset($_REQUEST['pass']) ? $_REQUEST['pass'] : NULL); diff --git a/client/index.php b/client/index.php index 342a7ce..dba02d4 100644 --- a/client/index.php +++ b/client/index.php @@ -29,6 +29,7 @@ function setError(&$response, $message) { } define("headless", true); +define("client", true); require_once(dirname(__DIR__) . "/auth.php"); // sets $user $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;