Skip to content

Don't match "#" in beIR host mask against the internal IP address string. #53

Description

@rud01f

As said in the title, please don't match beIR's masks containing "#" (maybe in the host part only) against the IP string internally (second pass of match() function, first is against full host, and second is always against the IP).

To be 100% clear, here's an example:

MODE #channel +b *!*@*.*#

Is made in hope that it will keep people with no revdns (like hostile_jim!~noident@192.168.100.14 ) from the channel by mask that matches last character of address being a digit.
In practice, it's gonna also match friendly_sam!user@example.com because example.com as well has an IPv4 address, which of course ends with a digit.

Relevant line (line #385 in ircd/channel.c):

if (match(tmp->value.alist->host, cptr->user->sip) == 0)

as suggested by patrick to change to:

if(!strchr(tmp->value.alist->host, '#') && match(tmp->value.alist->host, cptr->user->sip) == 0)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions