util.datamanager: Make sure only strings are passed as data to append()
authorKim Alvefur <zash@zash.se>
Fri, 11 Dec 2015 19:30:39 +0000 (20:30 +0100)
committerKim Alvefur <zash@zash.se>
Fri, 11 Dec 2015 19:30:39 +0000 (20:30 +0100)
util/datamanager.lua

index 510c0161aca948f6a0546ebb2cc8d7b1929a5b8d..e57d5fdc5ecdae39ed86598a0022cba47d78c7d6 100644 (file)
@@ -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;