Skip to content
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

Delayed-Join channel member is revealed even if the message is blocked +T #2

Open
DasBrain opened this issue May 29, 2021 · 3 comments

Comments

@DasBrain
Copy link

Currently client_can_send_to_channel is called first - and reveals the channel member, even if the message is later blocked by channel mode +T (MODE_NOMULTITARGET).

client_can_send_to_channel is called here:
https://github.com/quakenet/snircd/blob/master/ircd/ircd_relay.c#L102
+T is checked here:
https://github.com/quakenet/snircd/blob/master/ircd/ircd_relay.c#L110

Suggested fix:
Check for +T first.

@retropc
Copy link
Member

retropc commented May 29, 2021

it's a bit naughty that a function called client_can_send_to_channel mutates state

@retropc
Copy link
Member

retropc commented May 29, 2021

most of the other channel modes share the same bug, common with upstream: https://github.com/UndernetIRC/ircu2/blob/u2_10_12_branch/ircd/ircd_relay.c#L102

@DasBrain
Copy link
Author

For MODE_NOPRIVMSGS (+n), it doesn't matter - if it is denied, the user is not on the channel.
MODE_NOCOLOR and MODE_NOCTCP should be checked first.

And I agree - it took me a while to find the place where delay-join got removed, because I did not suspect client_can_send_to_channel to mutate state.
(If I could/have to rename it, I would name it client_prepare_send_to_channel.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants