remove double validation
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s

This commit is contained in:
2026-03-01 09:00:45 +01:00
parent c48d93642a
commit 0dff3ade09

View File

@@ -455,10 +455,6 @@ async def upload_script(
logger.warning("Invalid name provided: %s", name) logger.warning("Invalid name provided: %s", name)
raise HTTPException(status_code=400, detail=str(e)) raise HTTPException(status_code=400, detail=str(e))
if not script.filename.endswith(".py"):
logger.warning("Upload rejected: script not .py (name=%s original=%s)", name, script.filename)
raise HTTPException(status_code=400, detail="only .py scripts allowed")
spath = script_path_for(name) spath = script_path_for(name)
if os.path.exists(spath): if os.path.exists(spath):
logger.warning("Upload rejected: script with name already exists: %s", name) logger.warning("Upload rejected: script with name already exists: %s", name)