Software /
code /
prosody
Diff
util/datamanager.lua @ 11288:5fd1f1b544a0
util.datamanager: Fix not passing variables as format string to logger (thanks semgrep)
Passing error messages as format string could lead to errors, although
not a problem anymore since util.format sanitizes this.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 16 Jan 2021 15:49:46 +0100 |
parent | 10666:dfc8257d8445 |
child | 11369:87105a9a11df |
line wrap: on
line diff
--- a/util/datamanager.lua Sat Jan 16 00:24:06 2021 +0100 +++ b/util/datamanager.lua Sat Jan 16 15:49:46 2021 +0100 @@ -344,7 +344,7 @@ local mode, err = lfs.attributes(store_dir, "mode"); if not mode then - return function() log("debug", err or (store_dir .. " does not exist")) end + return function() log("debug", "Could not iterate over stores in %s: %s", store_dir, err); end end local next, state = lfs.dir(store_dir); -- luacheck: ignore 431/next 431/state return function(state) -- luacheck: ignore 431/state