diff options
-rw-r--r-- | util/sasl.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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 |