fix: validate invitation token format before database lookup #58
No reviewers
Labels
No labels
P1
P2
P3
PHP
agent-ready
bug
clotho
discovery
docs
epic
refactor
review
security
testing
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/php-tenant#58
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/validate-invitation-token-format"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
where("token", "[a-zA-Z0-9]{64}")route constraints to all three token-based routes inRoutes/web.phpWorkspaceInvitation::findByToken()which iterates up to 1000 rows doingHash::check()Fixes #43
Test plan
/workspace/invitation/<valid-64-char-token>still reaches the controller/workspace/invitation/../../etc/passwdreturns 404/workspace/invitation/shortreturns 404/account/delete/<valid-token>and cancel routes still workReplace hardcoded 'hub.host.uk.com' with config('app.base_domain') to match the existing pattern used in middleware and Blade views. Fixes #7 Fixes #8 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.