9ab93992d1
The older busybox-based wget erroneously accepted URLs without protocol. Add validator to avoid building firmwares with broken autoupdates.
15 lines
404 B
Lua
15 lines
404 B
Lua
need_string 'autoupdater.branch'
|
|
|
|
local function check_branch(k, _)
|
|
assert_uci_name(k)
|
|
|
|
local prefix = string.format('autoupdater.branches[%q].', k)
|
|
|
|
need_string(prefix .. 'name')
|
|
need_string_array_match(prefix .. 'mirrors', '^http://')
|
|
need_number(prefix .. 'good_signatures')
|
|
need_string_array_match(prefix .. 'pubkeys', '^%x+$')
|
|
end
|
|
|
|
need_table('autoupdater.branches', check_branch)
|