Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We currently allow illegal characters in file names #364

Open
ericweiner opened this issue May 9, 2024 · 2 comments
Open

We currently allow illegal characters in file names #364

ericweiner opened this issue May 9, 2024 · 2 comments
Assignees
Labels
bug Something isn't working Needs verification Issue originator close after verifying fix.

Comments

@ericweiner
Copy link
Collaborator

v 1.8 app release.

We had a user who was getting zero-length files when she named the individual steps in a protocol with a colon. (i.e. 1:1, 1:2, etc.)

We should validate all user-requested filenames to make sure that they are legal.

https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file

There's also a good list here towards the bottom:
https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names

@ericweiner ericweiner added the bug Something isn't working label May 9, 2024
@ericweiner
Copy link
Collaborator Author

actually that list at the end has a lot of perfectly valid characters in it...

Maybe just this:

Find all files and folders with any of these Windows-illegal characters in

their name: \ : * ? " < > |

find . -name '[\:*?"<>|]'

We should probably also check to make sure it won't go over 256 characters in the total path, if that is possible/easy.

@jmcoreymv
Copy link
Collaborator

Needs verification on the feature/imagej branch.

@jmcoreymv jmcoreymv added the Needs verification Issue originator close after verifying fix. label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs verification Issue originator close after verifying fix.
Projects
None yet
Development

No branches or pull requests

2 participants