From d54a4af11b8dc7340ce443ef5b150dd7ab5a2c71 Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Fri, 2 Oct 2009 15:03:11 +0200 Subject: [PATCH] fix configuration validation for files sources Signed-off-by: Gordon Hecker --- Changelog | 1 + local/files.lua | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Changelog b/Changelog index e6459fd..21644f2 100644 --- a/Changelog +++ b/Changelog @@ -7,6 +7,7 @@ NEXT: * hardlinks are used when preparing the result tarball, if possible, to improve performance * logfiles are rotated instead of deleting them + * a bug in configuration validation for files sources was fixed * unused code was removed * the faq section in the documentation was extended * outdated documentation was removed diff --git a/local/files.lua b/local/files.lua index 0b825a8..bd7b7ea 100644 --- a/local/files.lua +++ b/local/files.lua @@ -50,6 +50,11 @@ function files.validate_source(info, sourcename) end if src.file then for _,f in pairs(src.file) do + if type(f) ~= "table" then + e:append("%s: source has invalid file entry in `file' attribute", + sourcename) + break + end -- catch deprecated configuration if f.name then e:append("source has file entry with `name' attribute") -- 2.39.5