fix(openvpn/extract): trim spaces in config lines before parsing (#3327)

This commit is contained in:
Immanuel Tikhonov
2026-05-12 05:44:29 +04:00
committed by GitHub
parent fd12e5f9e7
commit cd19093d1d
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -62,6 +62,14 @@ func Test_extractDataFromLines(t *testing.T) {
Protocol: constants.UDP,
},
},
"leading_whitespace": {
lines: []string{" proto tcp", "\tremote 1.2.3.4 443 tcp"},
connection: models.Connection{
IP: netip.AddrFrom4([4]byte{1, 2, 3, 4}),
Port: 443,
Protocol: constants.TCP,
},
},
}
for name, testCase := range testCases {