Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1684

Empty space on a line in rule file confuses dbfwfilter which refuses to start

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.1.14, 2.2.3
    • Component/s: dbfwfilter
    • Labels:
      None
    • Environment:
      Linux CentOS 7.4

      Description

      I have the following rule file:

      rule selectcmd match regex '(?i)SELECT .*'
       
      users %@% match any rules selectcmd
      

      On the second line there is a single space. MariaDB MaxScale refuse to start and in the log I get:
      2018-02-24 12:06:34 warning: Firewall rules file lacks a trailing newline.
      2018-02-24 12:06:34 error : [dbfwfilter] Error on line 3, syntax error: users
      If you remove the single space on line two in the rules file, it works as expected:

      rule selectcmd match regex '(?i)SELECT .*'
       
      users %@% match any rules selectcmd
      

      There is the error message about a missing newline, but this is actually not a correct description of the issue and doesn't help in diagnosing the error.

        Attachments

          Activity

            People

            Assignee:
            johan.wikman Johan Wikman
            Reporter:
            karlsson Anders Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.