Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Changes to banning
« on December 14th, 2012, 06:20 PM »
This is more of a FYI and note in case it spawns bugs (it might introduce issues from the converter, I guess, as well as any place I didn't already catch)

I originally planned to overhaul is_activated in a different way, a long time ago, but I realised that it's sort of unnecessary (and not as performant as I'd hoped), so here's the plan for what is_activated means going forward. (There are so many fringe cases in SMF/Wedge around this >_<)

0 - user has registered, waiting for email activation
1 - user has registered and is active
2 - user has previously registered and is active but has changed their email address
3 - awaiting admin approval
4 - user is pending deletion
5 - awaiting COPPA approval

10 -> 19 - as 0 - 9 but with 'discourage' (i.e. Annoy User)
20 -> 29 - as 0 - 9 but banned on top

In other words, all I've done is move what was previously 10+ being banned to being 20+, with 10-19 being the new annoy facility. I also believe this is the only complete list of what all the states in SMF do for is_activated, I don't believe anyone previously actually figured it out (not even me, my original topic mentioning the changes I had originally planned didn't note states 2, 3 or 5, and until today I wasn't actually sure what state 2 did)

It is also possible additional statuses will be added, I'm likely going to add status 6 to mean 'user has to re-agree to the user agreement' but not just yet ;)
Re: Changes to banning
« Reply #1, on December 15th, 2012, 11:16 PM »
Huh, no-one had anything to say. Well, I have something that might prompt a few comments :D

Yes, this is the way the new look banning system is coming together.

 ban_list_2.png - 34.27 kB, 948x388, viewed 203 times.

Re: Changes to banning
« Reply #2, on December 16th, 2012, 12:46 AM »
And another one.
Posted: December 16th, 2012, 12:42 AM

In case it's not obvious, the ? by gmail.com is because the domain is set to be a "GMail style domain" as part of the ban. That means the GMail variations will be dealt with in the ban, e.g. john.smith, j.o.h.n.smith and all such variations plus +labels will all be ignored for the purposes of matching that ban.

I haven't made up my mind exactly what to allow/disallow with IP banning yet, whether it will allow wildcarding like that (and naturally for IPv6 too) or whether it will require CIDR blocks like that, or allow both. What I will say is that wildcard matching is faster than CIDR matching so I might just drop CIDR matching for bans and leave it as wildcards.

 ban_list_3.png - 57.45 kB, 936x562, viewed 202 times.

Re: Changes to banning
« Reply #3, on December 16th, 2012, 06:03 AM »
And the start of the settings page. This is what r1795 made possible ^_^

 ban_settings.png - 14.75 kB, 946x322, viewed 193 times.

When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: Changes to banning
« Reply #4, on December 17th, 2012, 05:23 AM »
I see the beginnings of the Annoy User integration. Nice!
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Changes to banning
« Reply #5, on December 17th, 2012, 05:25 AM »
Yeah, it's long overdue, and it'll be core so it will be less of an issue to maintain. Fun fact of the day, this will also have IP support, something I never wanted to add to Annoy User, though I understood why users did want it and that's why it's going to be here.

Also, I'm pleased this finally motivated me to add 'percent' type support in the admin panel.

godboko71

  • Fence accomplished!
  • Hello
  • Posts: 361
Re: Changes to banning
« Reply #6, on December 17th, 2012, 04:36 PM »
Loving what I am seeing here sorry for not getting back to you sooner...
Thank you,
Boko

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Changes to banning
« Reply #7, on December 23rd, 2012, 02:24 AM »
Also, probably the most controversial change.

The old 'Reserved User Names' page is being pulled out and embedded into the ban system. While this might look strange, this is a perfectly logical extension of the system to me...
Re: Changes to banning
« Reply #8, on December 23rd, 2012, 02:56 AM »
Achoo. Notice the difference between banning an individual user and banning types of names. The latter means you can ban types of name from registering should you want to do so (and more flexibly than the current reserved user names)
Posted: December 23rd, 2012, 02:54 AM

And yes, I added who made the ban. Seems logical.

 ban_list_4.png - 73.24 kB, 944x485, viewed 146 times.


live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: Changes to banning
« Reply #9, on December 23rd, 2012, 03:30 AM »
Quote from Arantor on December 23rd, 2012, 02:24 AM
Also, probably the most controversial change.

The old 'Reserved User Names' page is being pulled out and embedded into the ban system. While this might look strange, this is a perfectly logical extension of the system to me...
I always thought they went hand in hand.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Changes to banning
« Reply #10, on December 23rd, 2012, 03:50 AM »
It took me a while to come to realise it, because it always felt odd where it was but I could never pin it down as to why.

As much as I don't want to admit it, it was IPB that threw that particular little bone in my direction.

Powerbob

  • Posts: 151
Re: Changes to banning
« Reply #11, on December 23rd, 2012, 10:34 AM »
Quote from Arantor on December 23rd, 2012, 02:56 AM
Achoo. Notice the difference between banning an individual user and banning types of names. The latter means you can ban types of name from registering should you want to do so (and more flexibly than the current reserved user names)
Posted: December 23rd, 2012, 02:54 AM

And yes, I added who made the ban. Seems logical.
This is something that I find very logical, esp types of the same names. It will come in really useful.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Changes to banning
« Reply #12, on December 23rd, 2012, 02:19 PM »
OK, I've been thinking about how IP ranges should work, and for multiple reasons I've not been keen on using wildcards or even CIDR ranges, so instead I figured out a different and potentially better solution. Certainly it's faster and unambiguous in terms of coding.[1]

What I figured on doing is providing conventional ranges, e.g. a ban on 123.45.67.* would be expressed as a ban on 123.45.67.0 to 123.45.67.255. You'd input both the start and end as such.

Then, a ban on 123.45.*.* would be 123.45.0.0 to 123.45.255.255.

Doing the ban like this means the test for banning is very very fast; you convert that to the internal hex format Wedge uses (which is essentially IPv6 in full without the : in the middle) and do simple string comparisons (the hex versions of 123.45.0.0 and 123.45.255.255 will be 'less than' and 'greater than', respectively, than an address inside that range)
 1. Doing wildcards is not reliable, we don't handle IP addresses as numbers, but as hex, so you can't wildcard it very easily unless you're wildcarding to octet or half octet.
Re: Changes to banning
« Reply #13, on December 23rd, 2012, 03:47 PM »
Achoo. Definitely getting this sneezing bug that's going around.

 ban_add_2.png - 27.36 kB, 916x433, viewed 127 times.


godboko71

  • Fence accomplished!
  • Hello
  • Posts: 361
Re: Changes to banning
« Reply #14, on December 23rd, 2012, 06:14 PM »
Awesome stuff great work and stop sneezing get better soon.