Diff

plugins/mod_legacyauth.lua @ 11120:b2331f3dfeea

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 30 Sep 2020 09:50:33 +0100
parent 10557:e1cb869e2f6c
child 12328:a80314101bc6
line wrap: on
line diff
--- a/plugins/mod_legacyauth.lua	Thu Oct 01 15:08:58 2020 +0100
+++ b/plugins/mod_legacyauth.lua	Wed Sep 30 09:50:33 2020 +0100
@@ -78,8 +78,10 @@
 					session:close(); -- FIXME undo resource bind and auth instead of closing the session?
 					return true;
 				end
+				session.send(st.reply(stanza));
+			else
+				session.send(st.error_reply(stanza, "auth", "not-authorized", err));
 			end
-			session.send(st.reply(stanza));
 		else
 			session.send(st.error_reply(stanza, "auth", "not-authorized"));
 		end