From eca3d45fb65559811241d1d8455a858c143a6316 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Tue, 13 Aug 2024 03:15:10 +0200 Subject: [PATCH] Added tests. --- .../metrics/httpaccess/HttpAccessLogParserTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParserTest.java b/test/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParserTest.java index 5145299..dd3217a 100644 --- a/test/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParserTest.java +++ b/test/fr/devinsy/statoolinfos/metrics/httpaccess/HttpAccessLogParserTest.java @@ -55,6 +55,12 @@ public class HttpAccessLogParserTest // Line with many \". line = "10.141.57.46 - - [28/Apr/2023:13:46:34 +0200] \"GET /?\\\"\\\" HTTP/1.1\" 302 5143 \"https://www.gaagle.com/\\\"\\\"\" \"Mozilliqa\\\"\\\"\""; Assert.assertNotNull(HttpAccessLogParser.parseLog(line)); + + line = "10.48.83.91 - - [30/May/2024:00:41:04 +0200] \"GET /user.php?act=login HTTP/1.0\" 302 3383 \"554fcae493e564ee0dc75bdf2ebf94caads|a:2:{s:3:\\\"num\\\";s:107:\\\"*/SELECT 1,0x2d312720554e494f4e2f2a,2,4,5,6,7,8,0x7b24617364275d3b706870696e666f0928293b2f2f7d787878,10-- -\\\";s:2:\\\"id\\\";s:11:\\\"-1' UNION/*\\\";}554fcae493e564ee0dc75bdf2ebf94ca\" \"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.3319.102 Safari/537.36\""; + Assert.assertNotNull(HttpAccessLogParser.parseLog(line)); + + line = "10.9.74.87 - - [03/Aug/2023:21:11:59 +0200] \"GET /plus/flink.php?dopost=save&c=cat%20/etc/passwd HTTP/1.1\" 302 5438 \"