Fixed double quotes not woring with regex rules.

This commit is contained in:
Markus Makela
2015-04-02 16:20:36 +03:00
parent 3bc467c83c
commit 10f97572de

View File

@ -1025,7 +1025,7 @@ bool parse_rule(char* rule, FW_INSTANCE* instance)
goto retblock;
}
if(*tok != '\'' || *tok != '"')
if(*tok != '\'' && *tok != '\"')
{
skygw_log_write(LOGFILE_ERROR,"dbfwfilter: Rule parsing failed, regex string not quoted.");
rval = false;
@ -1084,7 +1084,7 @@ bool parse_rule(char* rule, FW_INSTANCE* instance)
memcpy(str, start, (tok-start));
if(regcomp(re, str,REG_NOSUB)){
if(regcomp(re, str,REG_NOSUB|REG_ICASE)){
skygw_log_write(LOGFILE_ERROR, "dbfwfilter: Invalid regular expression '%s'.", str);
rval = false;
free(re);