Skip to content

stages/email: make rate limit apply across flow restarts, not just on "resend email" button - #25496

Merged
BeryJu merged 1 commit into
goauthentik:mainfrom
atereshkin:fix-recover-email-rate-limiting
Oct 19, 2026
Merged

BeryJu merged 1 commit into
goauthentik:mainfrom
atereshkin:fix-recover-email-rate-limiting

Conversation

@atereshkin

Copy link
Copy Markdown
Contributor

Details

The Email stage supports rate-limiting to prevent malicious actors from toggling an avalanche of emails to a user's email address. However currently the limit can be bypassed by re-starting the flow. This PR addresses that deficiency.

What does this PR change?

This adds a rate-limit check in EmailStageView.get where it was previously missing.

How was this tested?

A regression test is added for this scenario + the fix was tested manually via UI.

AI disclosure

The patch was implemented using Claude Code / Fable 5, then reviewed and edited manually.


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)
  • I have read the AI usage policy.

@atereshkin
atereshkin requested a review from a team as a code owner August 26, 2026 09:43
@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 0eeea4f
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a8eb52d768b9d00082fdc1c
😎 Deploy Preview https://deploy-preview-25496--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.60%. Comparing base (b2a50ac) to head (0eeea4f).
⚠️ Report is 52 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25496      +/-   ##
==========================================
- Coverage   91.62%   91.60%   -0.03%     
==========================================
  Files        1151     1151              
  Lines       73251    73269      +18     
  Branches     3917     3917              
==========================================
+ Hits        67118    67119       +1     
- Misses       6097     6114      +17     
  Partials       36       36              
Flag Coverage Δ
conformance 34.42% <4.54%> (-0.01%) ⬇️
e2e 39.11% <13.63%> (+0.03%) ⬆️
integration 30.56% <4.54%> (-0.46%) ⬇️
rust 40.41% <ø> (ø)
unit 93.22% <100.00%> (+<0.01%) ⬆️
unit-migrate 93.24% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Oct 19, 2026
@BeryJu
BeryJu merged commit d9f6336 into goauthentik:main Oct 19, 2026
137 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Oct 19, 2026
kensternberg-authentik added a commit that referenced this pull request Oct 19, 2026
* main: (46 commits)
  core: bump library/node from 26.11.1-trixie to 26.12.0-trixie in /website (#26999)
  ci: bump taiki-e/install-action from 2.87.28 to 2.87.29 in /.github/actions/setup (#27008)
  stages/email: make rate limit apply across flow restarts, not just on "resend email" button (#25496)
  lifecycle: disable PostgreSQL JIT (#26970)
  ci: bump the codeql group across 1 directory with 3 updates (#27004)
  website/docs: kerberos: remove version frontmatter (#27019)
  web/admin: fix duplicate locale ID (#27018)
  providers/oauth2: token exchange support chained act (#26668)
  core: bump pydantic from 2.14.0 to 2.14.1 (#27000)
  website/integrations: add wasabi (#26990)
  core: bump cachetools from 7.2.1 to 7.2.2 (#27006)
  core: bump jsonpatch from 1.33 to 1.35 (#27007)
  core: bump uuid from 1.27.0 to 1.28.0 (#27003)
  core: bump selenium from 4.50.0 to 4.51.0 (#27001)
  core: bump tokio from 1.53.2 to 1.53.3 (#27005)
  core: bump django-postgres-extra from 2.0.9 to 3.0.0 (#27002)
  core: bump envoyproxy/envoy from v1.39-latest to v1.40-latest in /tests/e2e (#26994)
  core: bump axllent/mailpit from v1.31.5 to v1.31.6 in /tests/e2e (#26995)
  website/docs: clarify initial setup credentials (#26992)
  flows: separate base classes for api and non-api (#26988)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants