Hello,
Is there a way to blacklist files in regex-format i.e. for file-uploading?
As far as I understood the config-option “blacklisted_files” is only for filenames and not for regex, isn’t it?
My goal is to prevent my users to upload files with special chars in it.
wwe
March 3, 2022, 9:34pm
2
I don’t think there is no easy way to block special characters for file names. there are discussions on Guthub without visible solution
opened 08:45AM - 01 Jul 18 UTC
bug
high
technical debt
discussion
feature: sync engine
approved
The sync client may have issues with special chars like ":" on Windows. The char… acter is perfectly valid on Linux/BSD systems and allowed by all file systems I know.
The sync client may respect OS limitations in file names by renaming them locally on Windows clients:
For reference - see: opnsense/core#2498
File name template I use in OPNsense for config files: config-<Hostname>.<Domain Name>-<Date>_<Time>.xml
Currently there seems to be no error message on Windows for this, see #1723.
But you might build a Workflow which renames the files according your expectations…