-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mod_block_strangers shoud bounce instead of silently dropping #2197
Comments
"Account does not exist or rejects messages from strangers" would be a bit more useful for diagnostics while still not giving away any more information. |
I guess something like this. But if it wasn't implemented that way initially, I imagine it was for a good reason... diff --git a/src/mod_block_strangers.erl b/src/mod_block_strangers.erl
index b2c56f36b..3e0233802 100644
--- a/src/mod_block_strangers.erl
+++ b/src/mod_block_strangers.erl
@@ -65,7 +65,9 @@ filter_packet({#message{from = From} = Msg, State} = Acc) ->
false ->
case check_message(Msg) of
allow -> Acc;
- deny -> {stop, {drop, State}}
+ deny ->
+ ejabberd_router:route_error(Msg, xmpp:err_service_unavailable()),
+ {stop, {drop, State}}
end;
true ->
Acc |
I agree we should return an error message for this reason. But ...
Is this really a problem? Assuming |
Return a stanza error when a message is rejected, in order to make legitimate users aware of the issue. Closes processone#2197.
Return a stanza error when a message is rejected, in order to make legitimate users aware of the issue. Closes processone#2197.
P.S: please don't bounce |
I don't think we do?
I'm not sure we really want that. What's the advantage? |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
17.09 (on a remote server that I'm trying to contact)
The server is deploying
mod_block_strangers
in the default configuration.Messages sent to (existing) users on that server silently disappear. It is not clear to the sender if the messages are stored in offline storage, if the user just doesn't react, or if the messages are blocked.
Messages sent to non-existing users are bounced with
503 - cancel: Service unavailable
.This imposes two problems:
Please change the behavior of
mod_block_strangers
to:A naive suggestion would be:
policy-violation
"Messages from strangers are blocked on this server."(https://xmpp.org/rfcs/rfc6120.html#stanzas-error-conditions-policy-violation)
The text was updated successfully, but these errors were encountered: