fix: skip subjects with odd-length backslash runs in sync guard (#28)#29
Closed
spbsoluble wants to merge 1 commit into
Closed
fix: skip subjects with odd-length backslash runs in sync guard (#28)#29spbsoluble wants to merge 1 commit into
spbsoluble wants to merge 1 commit into
Conversation
spbsoluble
force-pushed
the
fix/issue-28-subject-guard-backslash
branch
from
July 23, 2026 17:52
0c7540c to
205422e
Compare
The 1.3.3 guard ran new X509Name(true, netCert.Subject), which does not throw on a CN containing an odd-length run of literal backslash bytes. Such subjects were admitted, persisted with backslashes escape-doubled, and then aborted Command's Full Scan with 'badly formatted directory string' when the gateway un-escaped one level and re-parsed the dangling escape on its /v2/certificate/search response. Replace the fragile mirror-the-gateway-parse approach with a structural, version-independent check: reject any subject whose literal backslash run has odd length (HasOddBackslashRun), keeping a defensive local X509Name parse as a second net. Even-length runs round-trip cleanly, matching the lab reproduction's abort/no-abort split (shape1 vs shape2/shape3). Add pure unit regression tests (no GCP required) via InternalsVisibleTo. This branch is based on release-1.3 and also drops the committed merge-conflict markers that release-1.3 carried in CHANGELOG.md and GCPCAS/Client/GCPCASClient.cs (same resolution as #27).
spbsoluble
force-pushed
the
fix/issue-28-subject-guard-backslash
branch
from
July 23, 2026 17:56
205422e to
8fb55fd
Compare
Contributor
Author
|
Closing and superseding with a fresh PR from branch fix/issue-30-subject-guard-backslash (re-filed to remove stale references; identical clean diff). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by PR #31 (re-filed clean, identical diff against release-1.3). See #31.