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

don't casefold extban characters #307

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jesopo
Copy link
Member

@jesopo jesopo commented Jan 1, 2022

No description provided.

Copy link
Contributor

@jillest jillest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not sufficient. There is another extban_table[(unsigned char) irctolower(*p)] below and there is also code that normalizes the extban character to lowercase when setting a ban. Perhaps this normalization should be skipped only if the uppercase extban exists, to avoid breaking existing behaviour.

Also, the uppercase and lowercase extbans need to know about each other since it's not possible to have two bans in a channel that only differ in case. Some clients such as irssi track ban lists so this may well be a client restriction as well.

@jesopo
Copy link
Member Author

jesopo commented Jan 1, 2022

I don't mind about the client angle given other popular IRCd software does this

@jesopo
Copy link
Member Author

jesopo commented Jan 1, 2022

I don't mind about the client angle given other popular IRCd software does this

(though I'm willing to lose this debate)

@jillest
Copy link
Contributor

jillest commented Jan 5, 2022

It seems like it would be best to make only the extban character case sensitive, so users manually typing in ban masks for -b get surprising results as infrequently as possible. A case sensitive extban character would be like modes.

Another alternative might be allowing extbans to be specified by whole words. I guess this was originally not done to avoid having too many ;-)

@jesopo
Copy link
Member Author

jesopo commented Jan 7, 2022

It seems like it would be best to make only the extban character case sensitive, so users manually typing in ban masks for -b get surprising results as infrequently as possible. A case sensitive extban character would be like modes.

is this not what the code in this PR currently does?

Copy link

@A-UNDERSCORE-D A-UNDERSCORE-D left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks alright, but,

Is there anything that expects this to always be casefolded outside of itself?
Does this have a plan to migrate or otherwise mitigate extbans that were set previously? Possibly checking if an existing extban would match one if casefolded?

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

Successfully merging this pull request may close these issues.

3 participants