aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-12-11 20:30:39 +0100
committerKim Alvefur <zash@zash.se>2015-12-11 20:30:39 +0100
commit2482f0614a927f7cf733c4a86a85183009778efd (patch)
tree1e56638a999cc5b1d937c617fded4d13880ad02e
parent25a50fa01abd5e64f203b4ec9c47f9113998d030 (diff)
downloadprosody-2482f0614a927f7cf733c4a86a85183009778efd.tar.gz
prosody-2482f0614a927f7cf733c4a86a85183009778efd.zip
util.datamanager: Make sure only strings are passed as data to append()
-rw-r--r--util/datamanager.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua
index 510c0161..e57d5fdc 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -211,6 +211,7 @@ end
-- Append a blob of data to a file
local function append(username, host, datastore, ext, data)
+ if type(data) ~= "string" then return; end
local filename = getpath(username, host, datastore, ext, true);
local ok;