Changeset

134:744deabdee81

mod_ipcheck: Fixed: 'service-unavailable' was sent instead of 'forbidden' on unauthorized access.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 06 Mar 2010 06:19:38 +0500
parents 133:8945153321a1
children 135:d3c28c5fdbae
files mod_ipcheck/mod_ipcheck.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_ipcheck/mod_ipcheck.lua	Thu Feb 25 22:43:54 2010 +0100
+++ b/mod_ipcheck/mod_ipcheck.lua	Sat Mar 06 06:19:38 2010 +0500
@@ -8,7 +8,7 @@
 
 module:hook("iq/bare/urn:xmpp:sic:0:ip", function(event)
 	local origin, stanza = event.origin, event.stanza;
-	if not stanza.attr.to and stanza.attr.type == "get" then
+	if stanza.attr.type == "get" then
 		if stanza.attr.to then
 			origin.send(st.error_reply(stanza, "auth", "forbidden", "You can only ask about your own IP address"));
 		elseif origin.ip then