From: Reinhard Tartler Date: Fri, 25 Sep 2026 06:28:39 -0400 Subject: Escape double quotes in test DN to comply with RFC 4514 In go-ldap >= 3.4.14, unescaped double quotes in DN strings are strictly rejected per RFC 4514 Section 2.4. In the Go string literal for validDN3, `\"` produced an unescaped literal `"` in the DN string rather than an escaped quotation mark `\"`, causing parsing to fail with `got unescaped character: '"'`. Escaping the double quotes properly as `\\\"` ensures validDN3 represents a valid RFC 4514 DN. Bug-Debian: https://bugs.debian.org/1148141 Forwarded: https://github.com/notaryproject/notation-go/pull/586 Last-Update: 2026-09-25 --- verifier/trustpolicy/trustpolicy_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verifier/trustpolicy/trustpolicy_test.go b/verifier/trustpolicy/trustpolicy_test.go index 07cf845..fcd99aa 100644 --- a/verifier/trustpolicy/trustpolicy_test.go +++ b/verifier/trustpolicy/trustpolicy_test.go @@ -185,7 +185,7 @@ func TestValidateTrustedIdentities(t *testing.T) { // Validate rfc4514 DNs validDN1 := "x509.subject:C=US,ST=WA,O=MyOrg" validDN2 := "x509.subject:C=US,ST=WA,O= My. Org" - validDN3 := "x509.subject:C=US,ST=WA,O=My \"special\" Org \\, \\; \\\\ others" + validDN3 := "x509.subject:C=US,ST=WA,O=My \\\"special\\\" Org \\, \\; \\\\ others" err = validateTrustedIdentities("test-statement-name", []string{validDN1, validDN2, validDN3}) if err != nil { t.Fatalf("valid x509.subject identity should not return error. Error : %q", err)