mirror of
https://github.com/openwrt/luci.git
synced 2026-02-04 12:06:01 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user