You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require.Equalf(t, p.Get("sqli"), values.Get("sqli"), "malformed or missing value for param sqli expected %v but got %v", values.Get("sqli"), p.Get("sqli"))
85
88
require.Equalf(t, p.Get("xss"), values.Get("xss"), "malformed or missing value for param xss expected %v but got %v", values.Get("xss"), p.Get("xss"))
86
89
}
90
+
91
+
funcTestURLEncode(t*testing.T) {
92
+
example:="\r\n"
93
+
got:=URLEncodeWithEscapes(example)
94
+
require.Equalf(t, "%0D%0A", got, "failed to url encode characters")
95
+
96
+
// verify with stdlib
97
+
forr:=0; r<20; r++ {
98
+
expected:=url.QueryEscape(string(rune(r)))
99
+
got:=URLEncodeWithEscapes(string(rune(r)))
100
+
require.Equalf(t, expected, got, "url encoding mismatch for non-printable char with ascii val:%v", r)
0 commit comments