aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/datamanager.lua4
-rw-r--r--util/sasl.lua6
2 files changed, 5 insertions, 5 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua
index 6a811879..c451d40d 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -88,7 +88,7 @@ end
function load(username, host, datastore)
local data, ret = loadfile(getpath(username, host, datastore));
if not data then
- log("warn", "Failed to load "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
+ log("debug", "Failed to load "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
return nil;
end
setfenv(data, {});
@@ -163,7 +163,7 @@ end
function list_load(username, host, datastore)
local data, ret = loadfile(getpath(username, host, datastore, "list"));
if not data then
- log("warn", "Failed to load "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
+ log("debug", "Failed to load "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
return nil;
end
local items = {};
diff --git a/util/sasl.lua b/util/sasl.lua
index ee2ba035..7e4d9ea8 100644
--- a/util/sasl.lua
+++ b/util/sasl.lua
@@ -176,9 +176,9 @@ local function new_digest_md5(realm, password_handler)
if not response["cnonce"] then return "failure", "malformed-request", "Missing entry for cnonce in SASL message." end
if not response["qop"] then response["qop"] = "auth" end
- if response["realm"] == nil then
- response["realm"] = "";
- elseif response["realm"] ~= self.realm and response["realm"] ~= "" then
+ if response["realm"] == nil or response["realm"] == "" then
+ response["realm"] = self.realm;
+ elseif response["realm"] ~= self.realm then
return "failure", "not-authorized", "Incorrect realm value";
end