fix: rewrite URLs with explicit port numbers in post content #4
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eric/multi-domain-redux!4
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/content-rewriter-explicit-port"
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
(?::\d{1,5})?before the tail lookahead inContentRewriter::rewrite()so URLs likehttps://example.com:8080/pathare now matched and rewrittenhttpsandhttpwith explicit portsMotivation
Hardening note #3 from the 2026-06-27 security audit. Functional inconsistency: the boundary lookahead didn't include
:, so port-qualified URLs in post/comment content were silently skipped. Not a security issue but a correctness gap.Test plan
composer test— 35/35 pass (1 new assertion)composer lint— clean🤖 Generated with Claude Code