Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29498

better protection against !include directive recursion

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • Configuration
    • None

    Description

      Right now the !include and !includedir directives only protect themselves against recursion by counting recursion depth.

      We had a user run into this as they had added

      !include /etc/mysql/mariadb.cnf
      

      to their my.cnf, not being aware that the later is just a symlink to the former and so both being the same file actually, and so causing an include look that prevent a later !includedir from being processed.

      I would suggest that in addition to tracking recursion depth the realpath of each file and directory included so far should be remembered, to filter out double includes before even running into a recursive include situation.

      As the number of included configuration file should not be extremely high to begin with, and as the information can safely be discarded again after having processed the full configuration, this should not be any big issue memory wise, and would make the config parsing process more robust.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hholzgra Hartmut Holzgraefe
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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