Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1744

Invalid ignore path regex can crash Picard

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.2.3, 2.3.0rc1
    • Fix Version/s: 2.3
    • Component/s: Other
    • Labels:
      None

      Description

      Specifying an invalid regex in Options > Advanced > Ignore paths (ignore_regex) and loading a file will crash Picard. E.g. settings this to something invalid like "["

      Traceback (most recent call last):
      File "./picard/tagger.py", line 392, in event
      event.run()
      File "./picard/util/thread.py", line 39, in run
      self.func(*self.args, **self.kwargs)
      File "./picard/tagger.py", line 534, in process
      self.add_files(result)
      File "./picard/tagger.py", line 465, in add_files
      ignoreregex = re.compile(pattern)
      File "/usr/lib/python3.8/re.py", line 250, in compile
      return _compile(pattern, flags)
      File "/usr/lib/python3.8/re.py", line 302, in _compile
      p = sre_compile.compile(pattern, flags)
      File "/usr/lib/python3.8/sre_compile.py", line 764, in compile
      p = sre_parse.parse(p, flags)
      File "/usr/lib/python3.8/sre_parse.py", line 948, in parse
      p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
      File "/usr/lib/python3.8/sre_parse.py", line 443, in _parse_sub
      itemsappend(_parse(source, state, verbose, nested + 1,
      File "/usr/lib/python3.8/sre_parse.py", line 549, in _parse
      raise source.error("unterminated character set",
      re.error: unterminated character set at position 7
      zsh: abort (core dumped) ./tagger.py

        Attachments

          Activity

            People

            • Assignee:
              outsidecontext Philipp Wolfer
              Reporter:
              outsidecontext Philipp Wolfer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                2.3