Detect malformed closing tags as errors in ApacheConfLexer #1656
Discovered this issue while fuzzing a parser I've been working on. When a scoped directive's closing tag is malformed with whitespace/newlines prior to the '>' this will generate an error during httpd's config test.
Will cause this error:
This patch aligns the token stream to more accurately detect this error. I identify open tags vs. closing tags by the absence or presence of the '/' after the '<', respectively. The opening tags should maintain all previous functionality. The closing tags will now be restricted to non-whitespace characters within.
I've included a positive test and negative test related to this specific issue. The negative test (test_malformed_scoped_directive_closing_tag) token stream was derived after the patches. The positive test (test_normal_scoped_directive) is present to ensure expected functionality is maintained.
The text was updated successfully, but these errors were encountered: