fix: rewrite URLs with explicit port numbers in post content #4
Loading…
Add table
Add a link
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