mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #965] [BUG] No restrictions on sending "Forgot Password" emails, which may pose a security risk #352
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#352
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Insulinocytus on GitHub (Sep 1, 2024).
Original GitHub issue: https://github.com/lldap/lldap/issues/965
Describe the bug
I tested sending multiple password reset emails to myself, and there were no warnings or limitations triggered, even after sending over a dozen emails.
Since my SMTP service charges per email, a hacker could easily guess my username (e.g., "admin") and send unlimited emails, potentially leading to significant costs for me.
Are there any plans to add CAPTCHA support to prevent such abuse?
I am not a web engineer myself, so any guidance or suggestions on how to address this issue would be greatly appreciated.
To Reproduce
Just send password reset email.
Expected behavior
You could consider setting a fixed interval, such as 1 minute, between sending emails to the same ID. Alternatively, requiring CAPTCHA verification before each email is sent could be another effective solution.
Logs
null
Additional context
null
@nitnelave commented on GitHub (Sep 1, 2024):
This is such a common problem with services that I feel that it would be a shame if everyone implemented it independently, and badly.
I feel like it would be better achieved through a local SMTP proxy with rate limiting.
@Insulinocytus commented on GitHub (Sep 1, 2024):
Agree.
Perhaps I can solve this by modifying my reverse proxy settings.
Anyway, thanks for your reply.
@nitnelave commented on GitHub (Sep 1, 2024):
Yeah, you can either do that by applying limits to the incoming HTTP queries (which is always good if you're afraid of DDoS), or by applying limits on the outgoing SMTP by using an SMTP proxy before forwarding to your actual provider.
@Insulinocytus commented on GitHub (Sep 2, 2024):
I'm using Traefik as a reverse proxy. Here's my solution.
In this way, each source can only reset the password once every 30 seconds.
github.com/lldap/lldap@6cf0f6df06/app/src/infra/api.rs (L180-L214)