util.datamanager: Make sure only strings are passed as data to append()
authorKim Alvefur <zash@zash.se>
Fri, 11 Dec 2015 20:30:39 +0100
changeset 7003 2b57f77985a3
parent 7002 0ad66d12113a
child 7004 2743759ca1b5
util.datamanager: Make sure only strings are passed as data to append()
util/datamanager.lua
--- a/util/datamanager.lua	Fri Dec 11 20:29:55 2015 +0100
+++ b/util/datamanager.lua	Fri Dec 11 20:30:39 2015 +0100
@@ -211,6 +211,7 @@
 
 -- 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;