diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2021-05-03 09:21:59 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-05-03 12:11:02 +0200 |
commit | a8c0ce02da5ce003150aa75d18f9360f29650581 (patch) | |
tree | ca5d1d40ca589548b28bd6be986f86d2dde89482 | |
parent | d4a20cbe01c3d5a9afd1902b880e46c3fc442b1d (diff) |
#949 Fix ogagent.log parser
Webconsole parses ogagent.log searching an IP without terminator
character. Thus, it takes entries with the selected IP and with IPs that
start as the selected IP. For example, if it searches for
10.1.30.10, it shows entries of 10.1.30.10, 10.1.30.100, 10.1.30.101...
Fix ogagent.log parser to only show entries of the selected IP.
-rw-r--r-- | admin/WebConsole/principal/configuraciones.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/WebConsole/principal/configuraciones.php b/admin/WebConsole/principal/configuraciones.php index 19ecff7d..fca880ab 100644 --- a/admin/WebConsole/principal/configuraciones.php +++ b/admin/WebConsole/principal/configuraciones.php @@ -356,7 +356,7 @@ function datos_sesiones($cmd, $idordenador) } if ($ip) { foreach (file(LOG_FILE) as $line) { - if (strstr($line, "ip=$ip")) { + if (strstr($line, "ip=$ip,")) { $fields = preg_split("/[:,=]/", rtrim($line, ". \t\n\r\0\x0B")); $date_time = str_replace("T", " ", $fields[0]) . ":" . $fields[1] . ":" . preg_replace("/\+.*$/", "", $fields[2]); |