Fix regression: ajax calls require authentication with public access
This commit is contained in:
parent
8b65b905ce
commit
b62b0b9b29
2
auth.php
2
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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user