shoc-backend/Api.SeaHavenIndustries
Alexandre Brandizzi c841e130be fix(auth): harden password reset codes against guessing and email enumeration
Forgot Password answers every address the same way and emails a code only
to an active account. Codes are stored as salted SHA-256 hashes, expire 15
minutes after issue, are replaced by a newer request, and are checked only
against the email they were issued to. Five failed checks delete the code;
attempts are reserved with one conditional UPDATE so concurrent guesses
cannot exceed the budget. VerificationCode requires the email, and email and
code are accepted in the JSON body so they stay out of URLs.

The three anonymous endpoints are rate limited to 10 requests per 15
minutes per client IP. Forwarded headers are trusted only through loopback
and private hops, since the API sits behind the EB load balancer and nginx.
The migration adds hash, salt, expiry and attempt columns and deletes the
old plaintext rows.
2026-09-25 12:21:29 -03:00
..
.config Initial commit 2024-09-28 14:58:36 -04:00
Controllers fix(auth): harden password reset codes against guessing and email enumeration 2026-09-25 12:21:29 -03:00
DTOs fix(auth): harden password reset codes against guessing and email enumeration 2026-09-25 12:21:29 -03:00
Filters merge: integrate origin/dev into PR #22 flag-color base 2026-07-24 14:20:16 -03:00
Helper feat: add API Sentry tracing (SH-298) (#105) 2026-09-04 14:11:32 -03:00
HostedServices feat: add API Sentry tracing (SH-298) (#105) 2026-09-04 14:11:32 -03:00
Infrastructure fix(auth): harden password reset codes against guessing and email enumeration 2026-09-25 12:21:29 -03:00
Middleware feat: add API Sentry tracing (SH-298) (#105) 2026-09-04 14:11:32 -03:00
Models initial commit for api changes 2025-02-18 13:13:33 -06:00
Observability fix(observability): preserve backend release identity (#114) 2026-09-15 16:08:14 -03:00
Options feat(work-orders): add Phase 5 scheduled domain events (WeekRolled) 2026-07-24 10:13:17 -03:00
Properties Initial commit 2024-09-28 14:58:36 -04:00
wwwroot Add zip-to-zip distance calculation for vendor dispatch 2026-04-17 11:56:06 -04:00
Api.SeaHavenIndustries.csproj feat: add API Sentry tracing (SH-298) (#105) 2026-09-04 14:11:32 -03:00
Api.SeaHavenIndustries.http Initial commit 2024-09-28 14:58:36 -04:00
appsettings.Development.json fix(security): remove hardcoded secrets from source 2026-06-05 11:56:54 -04:00
appsettings.json fix(work-orders): satisfy producer contract review 2026-07-27 16:33:06 -03:00
appsettings.Production.json fix(vendors): address roadmap review findings 2026-07-24 11:49:57 -03:00
aws-beanstalk-tools-defaults.json fixes for Dev changes 2026-04-24 12:12:16 -05:00
db.txt fixes for Dev changes 2026-04-24 12:12:16 -05:00
Program.cs fix(auth): harden password reset codes against guessing and email enumeration 2026-09-25 12:21:29 -03:00