-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tls: fix empty issuer/subject/infoAccess parsing #14473
Conversation
Also issuerCertificate but that did not fit on the status line. Fixes: nodejs#11771
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
if (c.subject) c.subject = tls.parseCertString(c.subject); | ||
if (c.infoAccess) { | ||
if (c.subject != null) c.subject = tls.parseCertString(c.subject); | ||
if (c.infoAccess != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you put a quick comment that != null
matches both null
and undefined
? I think that might not be newbie-friendly (also because in every guide about JS it is written to use ===
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a comment if you insist but we use the x != null
idiom all over the code base. It's not unique to this PR and we don't call it out explicitly anywhere else.
Also issuerCertificate but that did not fit on the status line. Fixes: nodejs#11771 PR-URL: nodejs#14473 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Landed in 06a684a |
should this be backported to v6.x? |
Yes. |
Also issuerCertificate but that did not fit on the status line.
Fixes: #11771
Split off from #14447.
CI: https://ci.nodejs.org/job/node-test-pull-request/9342/