summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest/common.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-05-24 12:20:04 +0000
committerramon <ramongomez@us.es>2017-05-24 12:20:04 +0000
commit2f110530c9fceb8ec8255570fc6d2f599fea4050 (patch)
tree68b610c4265986bf2ece16e9697b707523350f92 /admin/WebConsole/rest/common.php
parent2907fc5a9171829dd9a1b71dbaef5f4bbf1be9d1 (diff)
#708: Corregir erratas y comprobaciones en ruta para reservar cliente para acceso remoto.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5316 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/common.php')
-rw-r--r--admin/WebConsole/rest/common.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/admin/WebConsole/rest/common.php b/admin/WebConsole/rest/common.php
index 71778e8b..b7dcd109 100644
--- a/admin/WebConsole/rest/common.php
+++ b/admin/WebConsole/rest/common.php
@@ -66,10 +66,9 @@ function validateApiKey() {
$response = array();
$app = \Slim\Slim::getInstance();
// Read Authorization HTTP header.
- $headers = apache_request_headers();
- if (! empty($headers['Authorization'])) {
+ if (! empty($_SERVER['HTTP_AUTHORIZATION'])) {
// Assign user id. that match this key to global variable.
- $apikey = htmlspecialchars($headers['Authorization']);
+ $apikey = htmlspecialchars($_SERVER['HTTP_AUTHORIZATION']);
$cmd->texto = "SELECT idusuario
FROM usuarios
WHERE apikey='$apikey' LIMIT 1";