mod_s2s: Detect TLS compression
[prosody.git] / util / sasl / plain.lua
index fb20cf97d45e0424afd7c7044c5062dc37d68b73..ba4645e10bb08ce0ffa77c58699e351b070be7a7 100644 (file)
@@ -64,8 +64,10 @@ local function plain(self, message)
        end
 
        self.username = authentication
-       if not state then
+       if state == false then
                return "failure", "account-disabled";
+       elseif state == nil then
+               return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent.";
        end
 
        if correct then