fix(exec): guard POSIX double-slash absolute paths
This commit is contained in:
@@ -1012,8 +1012,10 @@ class ExecTool(Tool):
|
||||
)
|
||||
posix_paths = [
|
||||
p.rstrip(");},")
|
||||
for p in re.findall(r"(?:^|[\s|><='\"({,:])(/[^\"'>;|<()\s]+)", command)
|
||||
if not p.startswith("//")
|
||||
for p in re.findall(
|
||||
r"(?:^|[\s|><='\"({,]|:(?!//))(/[^\"'>;|<()\s]+)",
|
||||
command,
|
||||
)
|
||||
]
|
||||
home_paths = [
|
||||
p.rstrip(");},")
|
||||
|
||||
Reference in New Issue
Block a user