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
Hello!
It is not issue itself, but more like feature request for future: it would be great to perform recursive check of nested parameters.
For example, you have JSON as POST-arguments like {"a":{"b":{"c":1}},"d":2} and it is parsed to request.post.a.b.c = 1 and request.post.d = 2. It would be great to set single rule like request.post ~ "^[0-9]+$" to check all nested elements in request.post variable, instead of making separate checks, adopting rule to request.post.a.b.c ~ "^[0-9]+$" and request.post.d ~"^[0-9]+$".
In context of HTTP protocol, the same might be applicable for GET-arguments, headers, cookies or any parameter that may contain nested structure.
The text was updated successfully, but these errors were encountered:
It doesn't feel very intuitive to be honest, and might be even incompatible with current design, since it's possible to add custom field for request.post in which case request.post ~ "^[0-9]+$" would have a completely different meaning.
In my opinion, if you've set request.post as string - regex will match this particular string, but if it is nested variable, regex will apply to all child elements. The issue i have met is related to situations when you don't know in advance which variables are set as GET or POST arguments and it is impossible to write a wirefilter rule, that will match all of them. So the only way i found is to rewrite the wirefilter rule for each particular parameter separately (replace parameter in wirefilter condition, create new schema, add arguments and apply filter).
I don't know if this case is relevant for you, but just wanted to point out that it may appear.
Hello!
It is not issue itself, but more like feature request for future: it would be great to perform recursive check of nested parameters.
For example, you have JSON as POST-arguments like
{"a":{"b":{"c":1}},"d":2}
and it is parsed torequest.post.a.b.c = 1
andrequest.post.d = 2
. It would be great to set single rule likerequest.post ~ "^[0-9]+$"
to check all nested elements inrequest.post
variable, instead of making separate checks, adopting rule torequest.post.a.b.c ~ "^[0-9]+$"
andrequest.post.d ~"^[0-9]+$"
.In context of HTTP protocol, the same might be applicable for GET-arguments, headers, cookies or any parameter that may contain nested structure.
The text was updated successfully, but these errors were encountered: