summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-05-03 09:21:59 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-03 12:11:02 +0200
commita8c0ce02da5ce003150aa75d18f9360f29650581 (patch)
treeca5d1d40ca589548b28bd6be986f86d2dde89482 /admin
parentd4a20cbe01c3d5a9afd1902b880e46c3fc442b1d (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.
Diffstat (limited to 'admin')
-rw-r--r--admin/WebConsole/principal/configuraciones.php2
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]);