net.xmppcomponent_listener, mod_component: Removed useless undocumented option 'compo...
authorWaqas Hussain <waqas20@gmail.com>
Tue, 21 Sep 2010 12:37:11 +0000 (17:37 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Tue, 21 Sep 2010 12:37:11 +0000 (17:37 +0500)
net/xmppcomponent_listener.lua
plugins/mod_component.lua

index 5532186b1d4734f61f4418a6ea01d03572cba714..2cba2c32385a4204406ec3b727a8509a871fc544 100644 (file)
@@ -73,13 +73,10 @@ function stream_callbacks.streamopened(session, attr)
                return;
        end
        
-       -- Store the original host (this is used for config, etc.)
-       session.user = attr.to;
-       -- Set the host for future reference
-       session.host = config.get(attr.to, "core", "component_address") or attr.to;
        -- Note that we don't create the internal component 
        -- until after the external component auths successfully
 
+       session.host = attr.to;
        session.streamid = uuid_gen();
        session.notopen = nil;
        
index 033317434322944aab372a662ca12803d46ba1f4..7c7e58c4c6fece133b9d6300f8cc689551f6bd06 100644 (file)
@@ -31,9 +31,9 @@ function handle_component_auth(session, stanza)
                return;
        end
        
-       local secret = config.get(session.user, "core", "component_secret");
+       local secret = config.get(session.host, "core", "component_secret");
        if not secret then
-               (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.user);
+               (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host);
                session:close("not-authorized");
                return;
        end