diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/datamanager.lua | 4 | ||||
-rw-r--r-- | util/sasl.lua | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua index f25fffb3..99eef9f3 100644 --- a/util/datamanager.lua +++ b/util/datamanager.lua @@ -3,7 +3,7 @@ local setmetatable, type = setmetatable, type; local pairs, ipairs = pairs, ipairs; local char = string.char; local loadfile, setfenv, pcall = loadfile, setfenv, pcall; -local log = log; +local log = require "util.logger".init("datamanager"); local io_open = io.open; local os_remove = os.remove; local tostring, tonumber = tostring, tonumber; @@ -25,8 +25,6 @@ module "datamanager" ---- utils ----- local encode, decode; -local log = function (type, msg) return log(type, "datamanager", msg); end - do local urlcodes = setmetatable({}, { __index = function (t, k) t[k] = char(tonumber("0x"..k)); return t[k]; end }); diff --git a/util/sasl.lua b/util/sasl.lua index 001f40fb..0f03647f 100644 --- a/util/sasl.lua +++ b/util/sasl.lua @@ -66,7 +66,7 @@ local function new_digest_md5(realm, password_handler) local function parse(data) message = {} - for k, v in gmatch(data, [[([%w%-]+)="?([%w%-%/%.%+=]+)"?,?]]) do + for k, v in gmatch(data, [[([%w%-]+)="?([^",]*)"?,?]]) do -- FIXME The hacky regex makes me shudder message[k] = v end return message |