summaryrefslogtreecommitdiffstats
path: root/aconf/persistence/backends
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-07-09 22:18:45 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-07-10 01:21:42 +0300
commitbe803d679f7a51f93194c86e37168c651471031b (patch)
tree2087a6c2940eac434ca36d7defc6a8abf56ce223 /aconf/persistence/backends
parentb686f98cccbebe7fbd3216b3aff4153e1dfa35f8 (diff)
downloadaconf-be803d679f7a51f93194c86e37168c651471031b.tar.bz2
aconf-be803d679f7a51f93194c86e37168c651471031b.tar.xz
augeas back-end: check all path components
Diffstat (limited to 'aconf/persistence/backends')
-rw-r--r--aconf/persistence/backends/augeas.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/aconf/persistence/backends/augeas.lua b/aconf/persistence/backends/augeas.lua
index 7ce68f0..eb954e8 100644
--- a/aconf/persistence/backends/augeas.lua
+++ b/aconf/persistence/backends/augeas.lua
@@ -72,6 +72,7 @@ local function conv_path(path)
repeat
local comp = path[1]
+ assert(tostring(comp):match('^[%w %_%-%.%@%#%$]+$'))
if mode then
if mode == 'enumerate' then
@@ -79,7 +80,7 @@ local function conv_path(path)
res = append_pred(res, comp)
else
local k = key(mode)
- assert(k and type(comp) == 'string' and comp:match('^[%w %_%-%.%#]+$'))
+ assert(k and type(comp) == 'string')
res = append_key_pred(res, k, comp)
table.insert(keys, k)
end