Changeset

7000:2b57f77985a3

util.datamanager: Make sure only strings are passed as data to append()
author Kim Alvefur <zash@zash.se>
date Fri, 11 Dec 2015 20:30:39 +0100
parents 6999:0ad66d12113a
children 7001:2743759ca1b5
files util/datamanager.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;