-
Notifications
You must be signed in to change notification settings - Fork 43
KLine SSL Issue 177 #207
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
base: master
Are you sure you want to change the base?
KLine SSL Issue 177 #207
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -854,7 +854,7 @@ register_user(aClient *cptr, aClient *sptr, char *nick, char *username, | |
| : "Too many connections from your site"); | ||
| } | ||
|
|
||
| if(!(ban = check_userbanned(sptr, UBAN_IP|UBAN_CIDR4, UBAN_WILDUSER))) | ||
| if(!(ban = check_userbanned(sptr, UBAN_IP|UBAN_CIDR4, 0))) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is removing UBAN_WILDUSER necessary?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you look in check_userbanned, with the flag, during my tests, only bans on *@host instead of both and *user@host are being matched. |
||
| ban = check_userbanned(sptr, UBAN_HOST, 0); | ||
|
|
||
| if(ban) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like check_userbanned will be postponed until SERVER or USER is parsed even for non-SSL connections. Couldn't we just silently return here if it is a banned SSL connection, and add another ban check when the SSL handshake is finished?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. By skipping this part, one less look through the banlist for a match, especially if the ban is placed on user@host, as we don't have the user info here yet.