mirror of
https://github.com/openwrt/openwrt.git
synced 2026-04-14 14:33:21 +04:00
build: reject non-matching artifacts
Check for malformed artifact names before dereferencing them.
Fixes: 5816d883ff
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22385
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
committed by
Robert Marko
parent
48b8ff890b
commit
1f30a3288d
@@ -36,8 +36,9 @@ def add_artifact(artifact, prefix="openwrt-"):
|
|||||||
output[artifact] = {}
|
output[artifact] = {}
|
||||||
for file in files:
|
for file in files:
|
||||||
file = str(file.name)
|
file = str(file.name)
|
||||||
arch = re.match(r".*Linux-([^.]*)\.", file).group(1)
|
arch = re.match(r".*Linux-([^.]*)\.", file)
|
||||||
output[artifact][arch] = file
|
if arch:
|
||||||
|
output[artifact][arch.group(1)] = file
|
||||||
|
|
||||||
|
|
||||||
for json_file in work_dir.glob("*.json"):
|
for json_file in work_dir.glob("*.json"):
|
||||||
|
|||||||
Reference in New Issue
Block a user