Software /
code /
prosody
Comparison
util/datamanager.lua @ 10665:69acda92d5a9 0.11
util.datamanager: Fix iterating over "users" (thanks marc0s)
The 'store' path componend used to be unescaped until 756a2a00e7e7 added
escaping to address issues with characters like '/' used in PEP, but
with a special case for '_' which was already in common use in 'store'
path components.
Missed adding this escaping here.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 24 Feb 2020 23:16:08 +0100 |
parent | 8555:4f0f5b49bb03 |
child | 10666:dfc8257d8445 |
comparison
equal
deleted
inserted
replaced
10655:ee6c12264420 | 10665:69acda92d5a9 |
---|---|
318 list = "list"; | 318 list = "list"; |
319 } | 319 } |
320 | 320 |
321 local function users(host, store, typ) -- luacheck: ignore 431/store | 321 local function users(host, store, typ) -- luacheck: ignore 431/store |
322 typ = type_map[typ or "keyval"]; | 322 typ = type_map[typ or "keyval"]; |
323 local store_dir = format("%s/%s/%s", data_path, encode(host), store); | 323 local store_dir = format("%s/%s/%s", data_path, encode(host), store_encode(store)); |
324 | 324 |
325 local mode, err = lfs.attributes(store_dir, "mode"); | 325 local mode, err = lfs.attributes(store_dir, "mode"); |
326 if not mode then | 326 if not mode then |
327 return function() log("debug", "%s", err or (store_dir .. " does not exist")) end | 327 return function() log("debug", "%s", err or (store_dir .. " does not exist")) end |
328 end | 328 end |