summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest/server.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-02-06 17:58:42 +0000
committerramon <ramongomez@us.es>2017-02-06 17:58:42 +0000
commit400d58040e284018a928d4d8dfdfca5b6525342a (patch)
tree60a8a548ad69027c373659fc1d74c44b3f15e547 /admin/WebConsole/rest/server.php
parent9a39c75c31620c1494b40d27784b2e47bf2a11ec (diff)
#708: No mostrar mensaje incorrecto si falla la comprobaciĆ³n de la clave de acceso a la API REST.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5173 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/server.php')
-rw-r--r--admin/WebConsole/rest/server.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/admin/WebConsole/rest/server.php b/admin/WebConsole/rest/server.php
index a5b85d78..8119e519 100644
--- a/admin/WebConsole/rest/server.php
+++ b/admin/WebConsole/rest/server.php
@@ -21,7 +21,7 @@ function validateApiKey() {
global $cmd;
global $userid;
$response = array();
-
+ $app = \Slim\Slim::getInstance();
// Read Authorization HTTP header.
$headers = apache_request_headers();
if (! empty($headers['Authorization'])) {
@@ -29,7 +29,7 @@ function validateApiKey() {
$apikey = htmlspecialchars($headers['Authorization']);
$cmd->texto = "SELECT idusuario
FROM usuarios
- WHERE apikey='$apikey'";
+ WHERE apikey='$apikey' LIMIT 1";
$rs=new Recordset;
$rs->Comando=&$cmd;
if ($rs->Abrir()) {