We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a67e50 commit 2f40fa4Copy full SHA for 2f40fa4
arcada/api.py
@@ -82,7 +82,12 @@ def _validate_target(target: str) -> str:
82
# Allow URLs
83
if target.startswith(("http://", "https://")):
84
return target
85
-
+ # Detect Windows absolute paths like C:\ or D:\
86
+ if re.match(r"^[a-zA-Z]:\\", target):
87
+ raise HTTPException(
88
+ status_code=400,
89
+ detail="Windows absolute paths are not allowed. Use a GitHub URL or paste code directly.",
90
+ )
91
# Reject absolute paths
92
if os.path.isabs(target) or target.startswith("/") or target.startswith("\\"):
93
raise HTTPException(
0 commit comments