plugins/mod_component.lua

changeset 3503
85e511e01d3c
parent 3319
95fc08869273
child 3531
f41e1cfe92f4
equal deleted inserted replaced
3502:28887137bb1b 3503:85e511e01d3c
29 (session.log or log)("warn", "Component handshake invalid"); 29 (session.log or log)("warn", "Component handshake invalid");
30 session:close("not-authorized"); 30 session:close("not-authorized");
31 return; 31 return;
32 end 32 end
33 33
34 local secret = config.get(session.user, "core", "component_secret"); 34 local secret = config.get(session.host, "core", "component_secret");
35 if not secret then 35 if not secret then
36 (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.user); 36 (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host);
37 session:close("not-authorized"); 37 session:close("not-authorized");
38 return; 38 return;
39 end 39 end
40 40
41 local supplied_token = t_concat(stanza); 41 local supplied_token = t_concat(stanza);

mercurial