Skip to content

helpers: handle trailing whitespace that resembles DER - #1468

Open
lukevalenta wants to merge 1 commit into
cloudflare:masterfrom
lukevalenta:fix-der-trailing-whitespace
Open

lukevalenta wants to merge 1 commit into
cloudflare:masterfrom
lukevalenta:fix-der-trailing-whitespace

Conversation

@lukevalenta

Copy link
Copy Markdown
Contributor

Summary

Fix a regression from #1465 where trailing whitespace can be interpreted as another DER element. Check for an all-whitespace suffix at each element boundary before attempting to parse it.

Add tests for a CSR followed by twelve newlines and concatenated certificates followed by six CRLF pairs.

Tests

  • go test ./helpers ./csr ./bundler/... ./cli/... ./api/bundle/... ./api/generator/...

@lukevalenta
lukevalenta marked this pull request as ready for review November 25, 2026 14:32
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