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

Add options to filter registrations on invite request text #15275

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

Conversation

ClearlyClaire
Copy link
Contributor

@ClearlyClaire ClearlyClaire commented Dec 5, 2020

This partially addresses #13269 and #10742 by adding registration text filters: the rationale being that spambots frequently feel invited to paste their crap into the invite request field, so providing a way to filter those with keywords and regexps seem useful.

Admin and moderation interfaces

Adding a filter

image

Regexp validation

image

Listing filters (mod and admin-facing)

image

Audit log (mod and admin-facing)

image

Registration form (user-facing)

image

@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch from 7b98bc4 to 2e127b2 Compare December 5, 2020 19:16
@koyuawsmbrtn
Copy link
Contributor

Another idea that came to my mind is to use regex to disallow reserved usernames like admin, root etc.

@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch from 50906c8 to 6b81f27 Compare December 6, 2020 00:33
@shleeable
Copy link
Contributor

Love to see it.

@Gargron
Copy link
Member

Gargron commented Dec 13, 2020

Another idea that came to my mind is to use regex to disallow reserved usernames like admin, root etc.

There's already a list of reserved usernames! Though it's not regex, it's configurable.

Copy link
Member

@Gargron Gargron left a comment

Choose a reason for hiding this comment

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

General thoughts:

  • Making admins input regex directly will backfire. First, it's not very user-friendly and people will mess up the separators and escaped characters and what not (we've been through this with HTML already). Secondly, it's dangerous because people will accidentally create slow regexes. It would have to be something like our phrase filter form instead
  • Too many settings on one page. We need to begin splitting up settings into separate pages, like a page dedicated to sign-ups or whatever. The form is too huge.

@ClearlyClaire
Copy link
Contributor Author

Agreed wrt. regexps not being very user-friendly, although I do think being able to write regexps here is useful, maybe each filter could be either a word or a regexp. Wrt. slow regexps, only the instance admins can set them, and they are only applied to registrations, so I really don't think that's an issue.

I also agree with the fact the site settings would benefit being split into different pages, but I'm not too sure how they should be split.

@ClearlyClaire
Copy link
Contributor Author

Maybe I could split this PR in 3:

  • add the option to require invite request text (would still be an additional setting in the huge settings page, but we could break that down later)
  • JS fixes
  • add the option to filter on invite text (which would need to be reworked to not be a single regexp field)

@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch from 6b81f27 to c72cb7e Compare December 13, 2020 21:20
@ClearlyClaire
Copy link
Contributor Author

Split #15325 and #15326 out of it, I will rework the filtering thing later once they are merged.

@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch from c72cb7e to cfd2e0d Compare December 15, 2020 16:17
@ClearlyClaire ClearlyClaire marked this pull request as draft December 15, 2020 16:17
@ClearlyClaire ClearlyClaire changed the title Add options to require and filter invite request text Add options to filter regsistrations on invite request text Dec 15, 2020
Base automatically changed from master to main January 20, 2021 10:31
@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/wontfix This will not be worked on label Jun 2, 2021
@stale stale bot closed this Jun 9, 2021
@koyuawsmbrtn
Copy link
Contributor

bump

@ClearlyClaire ClearlyClaire reopened this Jul 9, 2021
@stale stale bot removed the status/wontfix This will not be worked on label Jul 9, 2021
@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch 9 times, most recently from 0f3c8ec to 462bdb3 Compare July 9, 2021 18:27
@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch 6 times, most recently from f9719b0 to 383d81d Compare July 9, 2021 19:35
@ClearlyClaire ClearlyClaire marked this pull request as ready for review July 9, 2021 19:39
@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch from 383d81d to e36f798 Compare August 31, 2021 19:29
ykzts
ykzts previously approved these changes Oct 31, 2021
@ClearlyClaire
Copy link
Contributor Author

ping @Gargron

@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch 2 times, most recently from 8c345bd to 8e6b7c2 Compare December 7, 2021 10:20
@ClearlyClaire
Copy link
Contributor Author

ping @Gargron

@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch from 8e6b7c2 to 024d312 Compare December 27, 2021 14:43
@ariasuni ariasuni changed the title Add options to filter regsistrations on invite request text Add options to filter registrations on invite request text Dec 27, 2021
@ClearlyClaire
Copy link
Contributor Author

Rebased. Again.

cc @Gargron

@mstdn
Copy link

mstdn commented Dec 31, 2021

Wow, this is a great start!

@cking
Copy link

cking commented Dec 31, 2021

instead of allowing "plain" regex, you instead could use regular wildcards (that are already wildly used) like * and ?

at least almost everyone understands what star means in normal wildcard environments. you could even go so far to make it understand (web)paths by differentiating /*/ (single directory) and /**/ (nexted directories) though that would be more complicated to understand

@mstdn
Copy link

mstdn commented Jan 19, 2022

Bump..

Is there a possibility this can get merged? We really, really, reallllllyyy need something against the bots..

@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch from 024d312 to 11ad100 Compare March 9, 2022 10:39
@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch from 11ad100 to 42ecd55 Compare May 24, 2022 14:18
@ClearlyClaire
Copy link
Contributor Author

Rebased again.

@ClearlyClaire ClearlyClaire force-pushed the fixes/optional-mandatory-invite-text-field branch from 42ecd55 to e499cc8 Compare July 28, 2022 11:48
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2022

This pull request has merge conflicts that must be resolved before it can be merged.

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

Successfully merging this pull request may close these issues.

None yet

7 participants