From: Gordon Hecker Date: Fri, 2 Oct 2009 13:21:05 +0000 (+0200) Subject: check if licences attribute in source config is a proper list of strings X-Git-Tag: e2factory-2.3.2rc1~45 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=0dbff8c45d9490ced5a245b2100467fde26f82d8;p=e2factory.git check if licences attribute in source config is a proper list of strings Signed-off-by: Gordon Hecker --- diff --git a/Changelog b/Changelog index 21644f2..1f39ae6 100644 --- a/Changelog +++ b/Changelog @@ -8,6 +8,8 @@ NEXT: improve performance * logfiles are rotated instead of deleting them * a bug in configuration validation for files sources was fixed + * a bug in validating the licences attribute in source configurations was + fixed * unused code was removed * the faq section in the documentation was extended * outdated documentation was removed diff --git a/local/git.lua b/local/git.lua index dc47390..c32e351 100644 --- a/local/git.lua +++ b/local/git.lua @@ -150,6 +150,12 @@ function source_apply_default_licences(info, sourcename) " licences attribute is not in table format. Converting.") src.licences = { src.licences } end + for i, s in pairs(src.licences) do + if type(i) ~= "number" or type(s) ~= "string" then + e:append("licences attribute is not a list of strings") + return false, e + end + end for _,l in ipairs(src.licences) do if not info.licences[l] then e:append("unknown licence: %s", l)