Skip to content

fix: expire stale auth challenges - #1438

Closed
silentgeckoaudit3801 wants to merge 1 commit into
LabsCrypt:mainfrom
silentgeckoaudit3801:fix-auth-challenge-timestamp-expiry
Closed

fix: expire stale auth challenges#1438
silentgeckoaudit3801 wants to merge 1 commit into
LabsCrypt:mainfrom
silentgeckoaudit3801:fix-auth-challenge-timestamp-expiry

Conversation

@silentgeckoaudit3801

Copy link
Copy Markdown

Fixes #1320.

This PR fixes �ackend/src/services/authService.ts::verifyChallengeTimestamp so the freshness check compares elapsed age as
ow - timestamp instead of subtracting in the opposite direction.

The existing �uthService unit coverage already includes the replay boundary this restores: timestamps within the max-age window are accepted and timestamps older than the window are rejected.

Validation: static GitHub API/source inspection only; local backend tests were not run in this environment to avoid installing or executing additional toolchains.

@ogazboiz

ogazboiz commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

thanks for the PR. this was a real bug when you branched, but the same fix already landed on main: authService already expires stale challenges and additionally handles clock skew, which this branch predates. since the change is now redundant, closing this one to keep the queue clean. please branch from current main before your next fix PR, and feel free to reopen if I misread anything. if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

@ogazboiz ogazboiz closed this Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] Auth challenge timestamps never expire, enabling replay

2 participants