Skip to content

Reject trailing newlines in SharedBulkhead name validation - #10

Merged
rasuvaeff merged 1 commit into
masterfrom
fix/pcre-anchor-z
Jul 25, 2026
Merged

Reject trailing newlines in SharedBulkhead name validation#10
rasuvaeff merged 1 commit into
masterfrom
fix/pcre-anchor-z

Conversation

@rasuvaeff

Copy link
Copy Markdown
Owner

PCRE \$ without /D matches before a trailing \n. SharedBulkhead::NAME_PATTERN was anchored with \$, so "<name>\n" passed and became the Redis/APCu key.

Fix: anchor with \\z. private const, bc-check stays green. AGENTS.md invariant updated.

Verification: composer build green (51 tests, 4173 assertions).

Release: 1.1.1 — Reject trailing newlines in bulkhead-name validation.

PCRE $ matches before a trailing \n. Switch the private NAME_PATTERN
to \z so "<name>\n" is rejected instead of becoming the Redis/APCu
key. Add regression test 'rejectsNameWithTrailingNewline'. AGENTS.md
invariant updated.
@rasuvaeff
rasuvaeff merged commit c34d205 into master Jul 25, 2026
12 of 13 checks passed
@rasuvaeff
rasuvaeff deleted the fix/pcre-anchor-z branch July 25, 2026 15:00
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.

1 participant