log.dat: Fix an error with 'unbound' logging too much data.

Message ID 20230217175337.1276318-1-jon.murphy@ipfire.org
State Accepted
Commit 4bb389232ea4610feb20fa880ee39d9ad514c8af
Headers
Series log.dat: Fix an error with 'unbound' logging too much data. |

Commit Message

jon Feb. 17, 2023, 5:53 p.m. UTC
  - Make regex "non-greedy"
- grab data up to first occurance of "]" and not last occurance of "]"

Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
---
 html/cgi-bin/logs.cgi/log.dat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat
index 5fb1fcd5d..17dacbbf5 100644
--- a/html/cgi-bin/logs.cgi/log.dat
+++ b/html/cgi-bin/logs.cgi/log.dat
@@ -74,7 +74,7 @@  my %sections = (
         'suricata' => '(suricata: )',
         'squid' => '(squid\[.*\]: |squid: )',
         'ssh' => '(sshd(?:\(.*\))?\[.*\]: )',
-        'unbound' => '(unbound: \[.*:.*\])(.*:.*$)',
+        'unbound' => '(unbound: \[.*?\])(.*:.*$)',
         'urlfilter bl' => '(installpackage\[urlfilter\]: )',
         'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:)'
 	 );