mirror of
https://github.com/bjc/prosody.git
synced 2025-04-06 22:57:38 +03:00
mod_s2s, mod_auth_anonymous, hostmanager: Remove disallow_s2s flag, deprecate the config option of the same name (disable mod_s2s instead), and add 'allow_anonymous_s2s' to separately control s2s for anonymous users
This commit is contained in:
parent
573a691a31
commit
0b4567a6f1
3 changed files with 4 additions and 4 deletions
|
@ -125,6 +125,7 @@ end
|
|||
|
||||
function module.add_host(module)
|
||||
if module:get_option_boolean("disallow_s2s", false) then
|
||||
module:log("warn", "The 'disallow_s2s' config option is deprecated, please see http://prosody.im/doc/s2s#disabling");
|
||||
return nil, "This host has disallow_s2s set";
|
||||
end
|
||||
module:hook("route/remote", route_to_existing_session, 200);
|
||||
|
@ -226,11 +227,11 @@ function stream_callbacks.streamopened(session, attr)
|
|||
text = "This host does not serve "..to
|
||||
});
|
||||
return;
|
||||
elseif hosts[to].disallow_s2s then
|
||||
elseif not hosts[to].modules.s2s then
|
||||
-- Attempting to connect to a host that disallows s2s
|
||||
session:close({
|
||||
condition = "policy-violation";
|
||||
text = "Server-to-server communication is not allowed to this host";
|
||||
text = "Server-to-server communication is disabled for this host";
|
||||
});
|
||||
return;
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue