gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Save initial signup information for users to aid in spam prevention

Open techknowlogick opened this issue 1 year ago • 1 comments
trafficstars

This will allow instance admins to view signup pattern patterns for public instances. It is modelled after discourse, mastodon, and MediaWiki's approaches.

Note: This has privacy implications, but as the above-stated open-source projects take this approach, especially MediaWiki, which I have no doubt looked into this thoroughly, it is likely okay for us, too. However, I would be appreciative of any feedback on how this could be improved.

techknowlogick avatar Aug 17 '24 02:08 techknowlogick

I support integrating this functionality, however, please make it opt-out so that instance admins can decide on their own if they do not want this feature due to privacy reasons.

I don't really think there is a privacy problem here as IP addresses should be kept for auditing purposes anyway and browser user agent string is not person identifying information or anyhow related to privacy

lafriks avatar Aug 19 '24 20:08 lafriks

@lafriks, I'm inclined to merge this as is, with it disabled by default. Then, you could open a new PR to change it so a more in-depth discussion can be had.

techknowlogick avatar Sep 07 '24 18:09 techknowlogick

What I do understand however, is that this is mostly intended for public instances. So perhaps we should describe in the config docs that especially those instances should consider enabling it?

delvh avatar Sep 07 '24 20:09 delvh

How about creating a CreateUserOptions as a parameter, user and others could be parameter of that struct.

lunny avatar Sep 07 '24 21:09 lunny

@delvh by recording signup IPs you can track if multiple users share the same address in case a spam ring creates many accounts. And the user agent is useful too as you can see additional behaviours

techknowlogick avatar Sep 08 '24 01:09 techknowlogick

@lunny yes, that can be done, but it's out of scope for this PR as I don't want to refactor too much in toys one.

techknowlogick avatar Sep 08 '24 01:09 techknowlogick

@lunny Should we move this PR to 1.23.0 milestone? As 1.23.0 is not released yet.

yp05327 avatar Sep 10 '24 02:09 yp05327