aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/sasl.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/sasl.lua b/util/sasl.lua
index dd8c2002..ee2ba035 100644
--- a/util/sasl.lua
+++ b/util/sasl.lua
@@ -177,12 +177,12 @@ local function new_digest_md5(realm, password_handler)
if not response["qop"] then response["qop"] = "auth" end
if response["realm"] == nil then
- response["realm"] = ""
- elseif response["realm"] ~= self.realm then
+ response["realm"] = "";
+ elseif response["realm"] ~= self.realm and response["realm"] ~= "" then
return "failure", "not-authorized", "Incorrect realm value";
end
- local decoder;
+ local decoder;
if response["charset"] == nil then
decoder = utf8tolatin1ifpossible;
elseif response["charset"] ~= "utf-8" then