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 antispam limitation on session link request & password recovery request #609

Open
Tirodem opened this issue Nov 14, 2023 · 8 comments

Comments

@Tirodem
Copy link
Contributor

Tirodem commented Nov 14, 2023

Anonymous users can currently use https://dev-bootik.pvh-labs.ch/customer/login to spam people with messages.
Anonymous users finding the admin url and an employee login or contact can currently use https://dev-bootik.pvh-labs.ch/admin-tirodem/login/recovery can do it too (still bothersome but less luck it happens).

We need a way to block this to avoid for beBOP to become a spam tool.

@coyotte508
Copy link
Collaborator

We can use hcaptcha: https://www.hcaptcha.com/

@Tirodem
Copy link
Contributor Author

Tirodem commented Nov 18, 2023

I understand the point but I have cold feet about captchas (especially centralized captcha services)

@coyotte508
Copy link
Collaborator

Hcaptcha is supposed to be the alternative to google captchas, RGPD-focused & so on. And it has a free plan.

Open to alternatives but it seems to be the easiest option.

A more complicated solution would be nostr-initiated (for npub auth), or preventing email altogether and only allowing SSO, or ask the user to send an email to a specific email address to reset their password (but it can become complicated).

@Tirodem
Copy link
Contributor Author

Tirodem commented Nov 18, 2023

As we're tracking sent emails, is is possible to tack the last one send for "Reset password" ou" Temporary session request" for the target email (idem for nostr) and say "nope, it's too early" in UI while resolving the CTA effect ?
With either a dynamic trehsold setted in admin or a 5 minutes one.
Idea here is more to block bad human actions than bots that'll trash someone email.
A bot will do this every five minutes, and if it happens, we'll do something to blacklist IP, both at least for now I think this kind of protection can cover both.
image
image

@coyotte508
Copy link
Collaborator

For reset password it's fine, for temporary session request no, a spammer could send 1 million differnet emails and get the bootik blacklisted from all email providers

(also send to variations, eg [email protected], [email protected] and so on)

@coyotte508
Copy link
Collaborator

Regarding captchas, with the paid version of hcaptcha ($100/month) it can be invisible to users.

Otherwise we can try to limit IPs, eg one IP can only do one send email request of any kind per 15 minutes, just have to handle IPv4 and IPv6

@Tirodem
Copy link
Contributor Author

Tirodem commented Nov 18, 2023

My proposition : let's split into 3 tickets with 3 priorities.

  • Add "frozen zone" delay between 2 sent email (password, session) to the same target email address (LxG MVP)
  • Avoid multiple email sollicitations on beBOP from the same asker IP (open source release MVP)
  • Avoid email sollicitation spam through a yet-to-identify self-hosted captcha solution or equivalent (later)

@coyotte508
Copy link
Collaborator

coyotte508 commented Dec 8, 2023

Added IP-based rate limting in #747

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

No branches or pull requests

2 participants