We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 801cdb1 commit 2a8761dCopy full SHA for 2a8761d
src/murfey/server/api/bootstrap.py
@@ -297,8 +297,12 @@ def get_msys2_setup(setup_file: str):
297
MSYS2 distribution that then remains on the client machines.
298
"""
299
300
+ # Validate characters in sent path
301
+ if not bool(re.fullmatch(r"^[\w\.\-]+$", setup_file)):
302
+ raise ValueError("Unallowed characters present in requested setup file")
303
+
304
# Allow only '.exe', 'tar.xz', 'tar.zst', or '.sig' files
- if not any(setup_file.endswith(suffix) for suffix in (msys2_file_ext)):
305
+ if not any(setup_file.endswith(ext) for ext in (msys2_file_ext)):
306
raise ValueError(f"{setup_file!r} is not a valid executable")
307
308
installer = requests.get(f"{msys2_url}/distrib/{setup_file}")
0 commit comments