aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-04-15 22:44:57 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-04-15 22:44:57 +0300
commit924986d7dadfed2150989af84f828e986c114116 (patch)
treeccca19e9be2ff0fdb9333a8dc5345b30ec7d6a11
parent787fd259d015c926c2cf3e88b7271a1ca4441a51 (diff)
downloadawall-924986d7dadfed2150989af84f828e986c114116.tar.bz2
awall-924986d7dadfed2150989af84f828e986c114116.tar.xz
error message for invalid top-level attributes
-rw-r--r--awall/policy.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/awall/policy.lua b/awall/policy.lua
index f6f427f..35ef24e 100644
--- a/awall/policy.lua
+++ b/awall/policy.lua
@@ -204,6 +204,10 @@ function PolicySet:load()
{'description', 'import', 'after', 'before'},
cls
) then
+ if type(objs) ~= 'table' then
+ raise('Invalid top-level attribute: '..cls..' ('..name..')')
+ end
+
if not source[cls] then source[cls] = {} end
if not input[cls] then