summaryrefslogtreecommitdiffstats
path: root/modules-available/remoteaccess/api.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2026-04-29 14:12:46 +0200
committerSimon Rettberg2026-04-29 14:12:46 +0200
commite9dd3b47e64f43d967a08cfc78efdffa95130a95 (patch)
tree7320ae4709724ccd769ebf9a6368565640afe85d /modules-available/remoteaccess/api.inc.php
parent[runmode] Add UUID to selected clients, close dropdown on select (diff)
parent[locationinfo] Use dedicated list permission for extdevices (diff)
downloadslx-admin-e9dd3b47e64f43d967a08cfc78efdffa95130a95.tar.gz
slx-admin-e9dd3b47e64f43d967a08cfc78efdffa95130a95.tar.xz
slx-admin-e9dd3b47e64f43d967a08cfc78efdffa95130a95.zip
Merge branch 'master' of git.openslx.org:openslx-ng/slx-admin
Diffstat (limited to 'modules-available/remoteaccess/api.inc.php')
-rw-r--r--modules-available/remoteaccess/api.inc.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules-available/remoteaccess/api.inc.php b/modules-available/remoteaccess/api.inc.php
index c558d126..16510ed9 100644
--- a/modules-available/remoteaccess/api.inc.php
+++ b/modules-available/remoteaccess/api.inc.php
@@ -1,7 +1,8 @@
<?php
-$ip = $_SERVER['REMOTE_ADDR'];
-if (substr($ip, 0, 7) === '::ffff:') $ip = substr($ip, 7);
+$ip = Util::getClientIp();
+if ($ip === null)
+ ErrorHandler::traceError("could not determine client IP");
$password = Request::post('password', false, 'string');
if ($password !== false) {