We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5173d94 commit fe24483Copy full SHA for fe24483
internal/operators/restpath_test.go
@@ -125,3 +125,19 @@ func TestRestPathShouldNotMatchOnIncompleteURLWithEndingParam(t *testing.T) {
125
t.Errorf("Expected %s to NOT match %s", exp, path)
126
}
127
128
+
129
+func TestRestPathShouldNotMatchOnEmptyPathElement(t *testing.T) {
130
+ waf := corazawaf.NewWAF()
131
+ tx := waf.NewTransaction()
132
+ exp := "/some-random/{id}/{name}"
133
+ path := "/some-random//test"
134
+ rp, err := newRESTPath(plugintypes.OperatorOptions{
135
+ Arguments: exp,
136
+ })
137
+ if err != nil {
138
+ t.Error(err)
139
+ }
140
+ if rp.Evaluate(tx, path) {
141
+ t.Errorf("Expected %s to NOT match %s", exp, path)
142
143
+}
0 commit comments