Skip to content
Snippets Groups Projects
Unverified Commit 92a6b81e authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-autoupdater: check that good_signatures does not exceed number of provided pubkeys

parent 3a893f67
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,13 @@ local branches = table_keys(need_table({'autoupdater', 'branches'}, function(bra
need_string(in_site(extend(branch, {'name'})))
need_string_array_match(extend(branch, {'mirrors'}), '^http://')
local pubkeys = need_string_array_match(in_site(extend(branch, {'pubkeys'})), '^%x+$')
need_number(in_site(extend(branch, {'good_signatures'})))
need_string_array_match(in_site(extend(branch, {'pubkeys'})), '^%x+$')
need(in_site(extend(branch, {'good_signatures'})), function(good_signatures)
return good_signatures <= #pubkeys
end, nil, string.format('be less than or equal to the number of public keys (%d)', #pubkeys))
obsolete(in_site(extend(branch, {'probability'})), 'Use GLUON_PRIORITY in site.mk instead.')
end))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment