From d39eab53a3d8d3bc9b040521bc041f7b9fc55016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Tue, 16 Oct 2018 20:09:01 +0200 Subject: [PATCH] [Web] Fix API --- data/web/inc/sessions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/web/inc/sessions.inc.php b/data/web/inc/sessions.inc.php index ac77e9ae5..96718dac1 100644 --- a/data/web/inc/sessions.inc.php +++ b/data/web/inc/sessions.inc.php @@ -33,7 +33,7 @@ if (!empty($_SERVER['HTTP_X_API_KEY'])) { ':api_key' => preg_replace('/[^a-zA-Z0-9-]/', '', $_SERVER['HTTP_X_API_KEY']) )); $api_return = $stmt->fetch(PDO::FETCH_ASSOC); - if (!empty($api_return['username'])) { + if (!empty($api_return['allow_from'])) { $remote = get_remote_ip(false); $allow_from = array_map('trim', preg_split( "/( |,|;|\n)/", $api_return['allow_from'])); if (in_array($remote, $allow_from)) {