Skip to content

Default "Invalid characters to block" list rejects valid Linux filenames ($ : ? * and others) #285

Done

Description

@quadcom

Plugin version 2026.11.13.

With "Validate input filenames" on (the default), the mover won't move a folder called Drug$ (2018). Every run sends this warning:

Error: Invalid filename path: "/mnt/<pool>/<share>/Drug$ (2018) ...". Please either change the filename to valid or disable the 'Validate input filenames' option.

The folder stays on the cache until someone renames it or changes the setting.

The default list in age_mover is:

DEFAULT_INVALID_FILE_CHARS=('$' '/' '<' '>' ':' '\"' '|' '?' '*')

On Linux the only character a filename can't contain is / (plus NUL). Everything else on that list is legal. Some problems with it:

  1. $ isn't illegal on any OS. Radarr and Sonarr don't replace it when they rename files, so titles like "Drug$" land on the cache with it intact and then get stuck there.
  2. : ? * " < > | are Windows rules. They can matter to SMB clients, but refusing to move the file doesn't help with that. The file is already on the share and Samba shows it the same way whether it sits on the cache or the array. The only effect is that it never leaves the cache.
  3. / can never match. validate_filename is called with $(basename "$f"), so the name it checks has no slashes in it.
  4. The setting says it's there to prevent attacks, but the list doesn't include the backtick or a newline, which are the characters that usually break shell scripts. From reading age_mover, file names look quoted and escaped before use (escape_find_path and so on), so $ shouldn't be a risk in the current code. I haven't tested names with a backtick or a newline.
  5. Clearing the field doesn't clear the list. An empty invalidFileChars falls back to the full default, so to allow $ and keep the length and ../ checks you have to leave a dummy entry like /.

Suggested changes:

  • Ship an empty default list, and keep the length and path traversal checks on by default.
  • Treat an empty field as "block nothing" instead of "use the default".
  • If the Windows characters stay available, say in the help text that they're only for people who care how names look over SMB.

Workaround for now: set "Invalid characters to block" to / and save.

Activity

  1. masterwishx commented on Nov 22, 2026

    @masterwishx
    Owner

    Thanks for opened issue, I and @chodeus will check it

  2. added a commit that references this issue on Nov 24, 2026
    6a2a139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions