mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-25 20:51:52 +08:00
fix: harden address parsing edge cases
This commit is contained in:
@@ -181,6 +181,16 @@ func TestOptimizeCookies(t *testing.T) {
|
||||
raw: "sid=simple",
|
||||
want: "sid=simple",
|
||||
},
|
||||
{
|
||||
name: "分号后无空格",
|
||||
raw: "token=xyz;user=admin;Path=/app;HttpOnly",
|
||||
want: "token=xyz; user=admin",
|
||||
},
|
||||
{
|
||||
name: "键名周围空格",
|
||||
raw: " token =xyz; user =admin; Path =/",
|
||||
want: "token=xyz; user=admin",
|
||||
},
|
||||
{
|
||||
name: "空字符串",
|
||||
raw: "",
|
||||
|
||||
Reference in New Issue
Block a user