luci-mod-system: make repokeys more future proof

Detect future release key names based on pattern.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2026-01-29 19:12:10 +01:00
parent 9a07b1b79d
commit a8328056e4

View File

@@ -22,6 +22,10 @@ function isFileInSafeList(file){
for (let name of safeList) {
if (file === name)
return true;
if (file.toLocaleLowerCase().replace(/^openwrt-[0-9]+\.[0-9]+/i, '') !== file)
return true;
if (file.toLocaleLowerCase().replace(/^openwrt-snapshots/i, '') !== file)
return true;
}
return false;
}