You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refer to this link for a list of reserved names for windows files.
Currently ShapesLab lets users choose their own category name which in turn will create a folder with the same category name. Since the creation of the folder is not done by the default "Create a Folder" by windows, reserved names can be entered into the category name and cause ShapesLab to stop working.
We should ban reserved words to be used as category names, an example will be "COM1" , when entered will cause an error to be thrown.
The category is added, however the directory cannot be created. Whenever users try to access the category "COM1" subsequently, an error will be thrown.
I did a check on the other labs and no other labs have a similar workflow that can cause this problem.
#1845)
* Added check to Reserved filenames in shapelab.
Added the check to the category creation in shape lab to not cause errors in file creation.
* Added reserved file names to invalidchars Regex
Added the Windows reserved file names to the invalid chars regular expression and added the reserved file names to the error message.
* Removed odd .htm file
Just deleted it.
* Added case insensitivity
Added a term to the regex so that it does not care about case.
* Fixed the Regex so that all cases are recognized
The regex to prevent windows reserved file names was fixed so that all cases and terms are matched.
* Deleted Comment
Self explanatory.
* Removed unnecessary using
Refer to this link for a list of reserved names for windows files.
Currently ShapesLab lets users choose their own category name which in turn will create a folder with the same category name. Since the creation of the folder is not done by the default "Create a Folder" by windows, reserved names can be entered into the category name and cause ShapesLab to stop working.
We should ban reserved words to be used as category names, an example will be "COM1" , when entered will cause an error to be thrown.
The category is added, however the directory cannot be created. Whenever users try to access the category "COM1" subsequently, an error will be thrown.
I did a check on the other labs and no other labs have a similar workflow that can cause this problem.
This post on StackOverflow can help.
Another way is to create the directory first, then catch the exception.
The text was updated successfully, but these errors were encountered: