Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Add rate-limiting for account recovery and registration#3093

Merged
reivilibre merged 4 commits intomainfrom
rei/rl_registration
Aug 7, 2024
Merged

Add rate-limiting for account recovery and registration#3093
reivilibre merged 4 commits intomainfrom
rei/rl_registration

Conversation

@reivilibre
Copy link
Copy Markdown
Contributor

@reivilibre reivilibre commented Aug 7, 2024

Follows #3090

Fixes #2992
Fixes #2541

@reivilibre reivilibre requested a review from sandhose August 7, 2024 17:41
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Aug 7, 2024

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: fcf68f6
Status: ✅  Deploy successful!
Preview URL: https://452668df.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://rei-rl-registration.matrix-authentication-service-docs.pages.dev

View logs


// Check the rate limit if we are about to process the form
if let Err(e) = limiter.check_account_recovery(requester, &recovery_session.email) {
tracing::warn!(error = &e as &dyn std::error::Error);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I really wish tracing had a sigil (like ? or %) to report as &dyn Error :(

Copy link
Copy Markdown
Contributor Author

@reivilibre reivilibre Aug 7, 2024

Choose a reason for hiding this comment

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

you're not alone: tokio-rs/tracing#1308

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rate-limit sending of e-mails Rate-limit password-based logins and registrations

2 participants