summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schulthess2017-01-18 17:19:17 +0100
committerChristoph Schulthess2017-01-18 17:19:17 +0100
commitbffc4390f76769f7d105171ced24ea346bc88c16 (patch)
tree02a4f76a86ae1a44dac4f0d0e153fcd7652b5a2c
parentsimplified debugrequest for testing purposes (diff)
downloadslx-admin-bffc4390f76769f7d105171ced24ea346bc88c16.tar.gz
slx-admin-bffc4390f76769f7d105171ced24ea346bc88c16.tar.xz
slx-admin-bffc4390f76769f7d105171ced24ea346bc88c16.zip
deactivated query
-rw-r--r--apis/debugrequest.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/apis/debugrequest.php b/apis/debugrequest.php
index 5e51972b..8e0fd78b 100644
--- a/apis/debugrequest.php
+++ b/apis/debugrequest.php
@@ -5,14 +5,15 @@ if ($debug_settings["status"] !== "enabled") {
http_response_code(403);
exit;
}*/
-
-$debug_request = file_get_contents("php://input");
-
-$validclient = Database::queryFirst("SELECT * FROM machine WHERE clientip = :ip", array(":ip" => $_SERVER["REMOTE_ADDR"]));
+$debug_request = json_decode(file_get_contents("php://input"), true);
+//$validclient = Database::queryFirst("SELECT machineuuid, clientip FROM machine WHERE machineuuid = :uuid AND clientip = :ip", array(":uuid" => $debug_request["uuid"], ":ip" => \'$_SERVER["REMOTE_ADDR"]\'));
+$validclient = true;
if ($validclient == false) {
http_response_code(400);
} else {
http_response_code(200);
- $data = json_encode(array("ip" => $_SERVER["REMOTE_ADDR"], "port" => 5900 + $debug_request));
- Taskmanager::submit('relay', $data, true);
+ //$data = json_encode(array("ip" => $_SERVER["REMOTE_ADDR"], "port" => 5900 + $debug_request["display"]));
+ //Taskmanager::submit('relay', $data, true);
}
+
+//echo file_get_contents("php://input");