aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-01-09 20:49:39 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-01-09 20:49:39 +0500
commit5d25f17e021ef01d4733f00edce4b3b6d5c06b82 (patch)
tree3b6ae2af7dd98a656863309762c5775b2189ad8f /util
parent6b15ed47fd5bd8bc77186da4ef27384e933188c7 (diff)
downloadprosody-5d25f17e021ef01d4733f00edce4b3b6d5c06b82.tar.gz
prosody-5d25f17e021ef01d4733f00edce4b3b6d5c06b82.zip
sasl: Don't fail for realm=""
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