script: Filename and folder name testing is too restrictive and unsecure #1386
Labels
bug(fix)
Something isn't working or address a specific issue or vulnerability
Milestone
Currently, the regular expressions defined in the script.py module (at this location) do not allow spaces in filenames or folder names. This restriction may prevent the use of scripts in directories or files with spaces in their names, which is a common scenario.
Expected Behavior
The regular expressions should accommodate spaces in both filenames and folder names. For example:
A filename like my script.py should be valid.
A folder like project files/ should also be valid.
Suggested Changes
Update the regular expressions in the script.py file to include support for spaces. Specifically:
Allow spaces (\s) where filenames or folder names are defined in the regular expression.
Ensure that this change does not break any existing functionality or introduce regressions.
Additional Notes
Be mindful of potential edge cases where spaces at the beginning or end of filenames/folder names could cause issues.
If applicable, add or update unit tests to validate the new behavior.
Environment
Thank you for considering this improvement!
The text was updated successfully, but these errors were encountered: