diff options
| author | Simon Rettberg | 2026-04-29 14:12:46 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2026-04-29 14:12:46 +0200 |
| commit | e9dd3b47e64f43d967a08cfc78efdffa95130a95 (patch) | |
| tree | 7320ae4709724ccd769ebf9a6368565640afe85d /modules-available/syslog | |
| parent | [runmode] Add UUID to selected clients, close dropdown on select (diff) | |
| parent | [locationinfo] Use dedicated list permission for extdevices (diff) | |
| download | slx-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/syslog')
| -rw-r--r-- | modules-available/syslog/api.inc.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules-available/syslog/api.inc.php b/modules-available/syslog/api.inc.php index c810feb7..eb223ae1 100644 --- a/modules-available/syslog/api.inc.php +++ b/modules-available/syslog/api.inc.php @@ -42,8 +42,9 @@ if (($user = Request::post('export-user', false, 'string')) !== false) { $type = Request::post('type', Request::REQUIRED, 'string'); -$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"); // TODO: Handle UUID in appropriate modules (optional) $uuid = Request::post('uuid', '', 'string'); |
