]> git.e2factory.org Git - e2factory.git/commitdiff
check if licences attribute in source config is a proper list of strings
authorGordon Hecker <gh@emlix.com>
Fri, 2 Oct 2009 13:21:05 +0000 (15:21 +0200)
committerGordon Hecker <gh@emlix.com>
Fri, 2 Oct 2009 13:22:21 +0000 (15:22 +0200)
Signed-off-by: Gordon Hecker <gh@emlix.com>
Changelog
local/git.lua

index 21644f2d473d4ccd976f5cf182645e6c38efc573..1f39ae6beefc9afff41ee3c77bd027245424cfd8 100644 (file)
--- 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
index dc4739066cbea36c2854ca465b43e9c1905debaa..c32e3514cdf5e48a5b6898adfeecbf147dbe9503 100644 (file)
@@ -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)