Skip to content

Commit a832805

Browse files
committed
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>
1 parent 9a07b1b commit a832805

File tree

1 file changed

+4
-0
lines changed
  • modules/luci-mod-system/htdocs/luci-static/resources/view/system

1 file changed

+4
-0
lines changed

modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ function isFileInSafeList(file){
2222
for (let name of safeList) {
2323
if (file === name)
2424
return true;
25+
if (file.toLocaleLowerCase().replace(/^openwrt-[0-9]+\.[0-9]+/i, '') !== file)
26+
return true;
27+
if (file.toLocaleLowerCase().replace(/^openwrt-snapshots/i, '') !== file)
28+
return true;
2529
}
2630
return false;
2731
}

0 commit comments

Comments
 (0)