Auth hardening + Terms acceptance and public info pages#45
Open
matthew-demidoff wants to merge 4 commits into
Open
Auth hardening + Terms acceptance and public info pages#45matthew-demidoff wants to merge 4 commits into
matthew-demidoff wants to merge 4 commits into
Conversation
The login-widget callback minted a session straight from a Telegram-signed payload without checking account status, and findSessionByToken did not exclude banned users, so a banned account whose Telegram stayed linked could re-enter every page and server action. Check status and the telegram_id ban on the callback, and exclude banned users at session resolution.
…nd relink These routes used a raw session lookup that skipped the requireUser gate, letting a banned or restricted account add a passkey or change its Telegram link. Route them through requireUser.
New apps and DCR approvals stored one secret hash in both api_key_hash and oauth_client_secret_hash, so leaking one credential compromised both surfaces and rotating the OAuth secret left the old API key valid. Issue independent secrets; bearer-only apps now store a null OAuth secret.
… pages Registration now requires accepting the Terms, Privacy Policy, and Rules; acceptance time and version are recorded per account (migration 025). Add public /docs, /faq, /terms, /privacy, /rules pages under app/(info), move FAQ out of the authenticated area, and point the landing page at the public URLs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security
requireUser, so banned or restricted accounts cannot mutate auth credentials.Terms acceptance + public info pages
025_terms_acceptance).app/(info):/docs,/faq,/terms,/privacy,/rules. FAQ moved out of the authenticated area; landing page repointed to the public URLs.Verification
tscclean; 166 unit tests pass (added a banned-callback regression test and terms-acceptance validation coverage);next buildsucceeds.Migration 025 is additive and idempotent and applies automatically at app container boot.