CARVIEW |
Select Language
HTTP/2 200
date: Fri, 18 Jul 2025 09:00:07 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/golang/go.git
etag: W/"d53d01fd72a445352ceff902df3b9d04"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=LcFUpv4e4ILpw8CSy%2Fa6VEMIHntQlfiphREKbAOb9pZDJpoCQcZj5GWA3%2Bc%2Bsc148T83%2FV7ipyytaUUxTuhxh0uDsRUq9JHPv0yvPER07RtD779dGuBqaHkRhngjWfvC1aBglY2QDUxoZpy%2FG0Ir69DtgeXaBHFW5%2F0hhrdQJ8hL2ZJgQP4Zx%2BTcWp77BKQV6LWZ8igQmc1tSQFrlgnZGkS%2BCtL0qV%2FvzCeTi6vUwi%2BQYALqZX97KZZqykG1g3X1m%2FI8JGGvEW8OlMEiHMc3lQ%3D%3D--nCFzj3iy0O4MIyeu--cW73jjw9LLczBM%2FiYT19ww%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.332338091.1752829206; Path=/; Domain=github.com; Expires=Sat, 18 Jul 2026 09:00:06 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 18 Jul 2026 09:00:06 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: B1A6:19D3FC:B319E7:D9DD72:687A0D16
crypto/x509: treat hostnames with colons as invalid · golang/go@f81aa23 · GitHub
Copy file name to clipboardExpand all lines: src/crypto/x509/verify_test.go
Copy file name to clipboardExpand all lines: src/crypto/x509/x509_test.go
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Commit f81aa23
committed
crypto/x509: treat hostnames with colons as invalid
Colons are port separators, so it's risky to allow them in hostnames.
Per the CL 231377 rule, if we at least consider them invalid we will not
apply wildcard processing to them, making behavior a little more
predictable.
We were considering hostnames with colons valid (against spec) because
that meant we'd not ignore them in Common Name. (There was at least
one deployment that was putting colons in Common Name and expecting it
to verify.)
Now that Common Name is ignored by default, those clients will break
again, so it's a good time to drop the exception. Hopefully they moved
to SANs, where invalid hostnames are checked 1:1 (ignoring wildcards)
but still work. (If they didn't, this change means they can't use
GODEBUG=x509ignoreCN=0 to opt back in, but again you don't get to use a
legacy deprecated field AND invalid hostnames.)
Updates #24151
Change-Id: Id44b4fecb2d620480acdfc65fea1473f7abbca7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/231381
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>1 parent 95c5ec6 commit f81aa23Copy full SHA for f81aa23
File tree
Expand file treeCollapse file tree
3 files changed
+12
-4
lines changedFilter options
- src/crypto/x509
Expand file treeCollapse file tree
3 files changed
+12
-4
lines changed+2-2Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
940 | 940 |
| |
941 | 941 |
| |
942 | 942 |
| |
943 |
| - | |
944 |
| - | |
| 943 | + | |
| 944 | + | |
945 | 945 |
| |
946 | 946 |
| |
947 | 947 |
| |
|
src/crypto/x509/verify_test.go
Copy file name to clipboardExpand all lines: src/crypto/x509/verify_test.go+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2004 | 2004 |
| |
2005 | 2005 |
| |
2006 | 2006 |
| |
2007 |
| - | |
| 2007 | + | |
2008 | 2008 |
| |
2009 | 2009 |
| |
2010 | 2010 |
| |
|
src/crypto/x509/x509_test.go
Copy file name to clipboardExpand all lines: src/crypto/x509/x509_test.go+9-1Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
376 | 376 |
| |
377 | 377 |
| |
378 | 378 |
| |
379 |
| - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
380 | 388 |
| |
381 | 389 |
| |
382 | 390 |
| |
|
You can’t perform that action at this time.
0 commit comments