For example, if the config file contains line <FilesMatch "\.(cgi|shtml|phtml|php)$">,
method ParseApacheConfig._return_conf_list() throws an exception pyparsing.ParseException on the line 311 of parse_config.py.
Error occurs because of incorrectly defined LITERAL_TAG, and solution is to add missing characters to definition. Please change this:
LITERAL_TAG = OneOrMore(Word(
alphanums + '*:' + '/' + '"-' + '.' + " " + "^" + "_" + "!" + "[]?$" + "'" + '\\'
))
to this:
LITERAL_TAG = OneOrMore(Word(
alphanums + '*:' + '/' + '"-' + '.' + " " + "^" + "_" + "!" + "[]?$" + "'" + '\\' + '"' + "|" + "(" + ")")
)
I'm not completely sure that this addition will prevent this type of error for every possible apache conf file, but it will work for the most common cases.
For example, if the config file contains line
<FilesMatch "\.(cgi|shtml|phtml|php)$">,method
ParseApacheConfig._return_conf_list()throws an exceptionpyparsing.ParseExceptionon the line 311 of parse_config.py.Error occurs because of incorrectly defined
LITERAL_TAG, and solution is to add missing characters to definition. Please change this:to this:
I'm not completely sure that this addition will prevent this type of error for every possible apache conf file, but it will work for the most common cases.