solanum icon indicating copy to clipboard operation
solanum copied to clipboard

extb_extgecos doesn't support CIDRs

Open jesopo opened this issue 5 years ago • 2 comments

jesopo avatar Oct 21 '20 17:10 jesopo

Instead of constructing a single string with

	snprintf(buf, BUFSIZE, "%s!%s@%s#%s",
		client_p->name, client_p->username, client_p->host, client_p->info);

could we instead perform a normal ban match against client_p and then post-process match against the gecos field?

This would require us to split the extban on # instead of constructing a string to match against.

To support this we'd probably want to extend the extban API to pass the matchset through.

glguy avatar Oct 21 '20 17:10 glguy

We could very easily add in a check of the user's orighost to make $x apply to IPs when an rDNS is present (which we should definitely do). However, match_cidr() does not seem to work when you feed it a banmask with wildcards and causes it to not match. This is also the case with a normal ban too.

examknow avatar Apr 07 '21 22:04 examknow