Improve SnippetsFilters telemetry collection #2702
Labels
area/nginx-configuration
Relates to nginx configuration
backlog
Currently unprioritized work. May change with user feedback or as the product progresses.
bug
Something isn't working
Credit to @pleshakov , the telemetry collection of SnippetsFilters added in this PR has a few edge cases which lead to incorrect behavior. The issue comes up when parsing nginx directives and values. This is the current implementation of parsing Snippet values
This current implementation is too lax on using the
;
character as a separator for directives and leaves room for many edge cases to incorrectly get parsed.Below are some examples:
Use of the map directive, which not only doesn't have the
;
character at the end of the directive, but can have nested;
characters which are not directives.input:
output:
Any example with
;
included in the value.proxy_set_header hello "myvalue;abc";
Comments in general, AND if
;
is inside a comment# this is a nasty; comment
The text was updated successfully, but these errors were encountered: