GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Adding an extra check for cert.subject before assuming it is there. by mansona · Pull Request #2556 · nodejs/node

Conversation

@mansona

@mansona mansona commented Aug 26, 2015

Copy link
Copy Markdown

One of my long running node services started giving out a TLS error without very much detail overnight:

 TypeError: Cannot read property 'CN' of undefined
     at Object.checkServerIdentity (tls.js:182:37)
     at TLSSocket.<anonymous> (_tls_wrap.js:1016:29)
     at emitNone (events.js:67:13)
     at TLSSocket.emit (events.js:166:7)
     at TLSSocket._finishInit (_tls_wrap.js:566:8)

I tracked it down to the line:

        reason = util.format('Host: %s is not cert\'s CN: %s',
                             host,
                             cert.subject.CN);

which assumes cert.subject is available.

I don't really know what is causing this and I can't tell which domain is causing this so I probably won't be able to recreate this locally to verify it's still working but I think it is at least sensible to use defensive programming in this instance.

I would ideally like to back port this to the 2.5.x branch but I couldn't find the head of that branch, can someone tell me which branch is currently the 2.5.x head?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mansona
Adding an extra check for cert.subject before assuming it is there.
24d9c45
@mscdex mscdex added the tls Issues and PRs related to the tls subsystem. label Aug 26, 2015
@mscdex

mscdex commented Aug 26, 2015

Copy link
Copy Markdown
Contributor

Duplicate of #2304 which was fixed by #2312.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mscdex mscdex closed this Aug 26, 2015
@targos

targos commented Aug 26, 2015

Copy link
Copy Markdown
Member

@mansona the fix @mscdex is talking about is included since v3.1.0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mansona

mansona commented Aug 27, 2015

Copy link
Copy Markdown
Author

Thanks for the update. @targos thanks for the update, that will be why I haven't been able to see it. I am currently stuck on v2.5.0 because of a few binary packages updating so I will just have to wait.

Thanks again 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott mentioned this pull request Oct 11, 2021
(unintended?) npm@8 breaking change: return status different for npm outdated #40382
Closed
@leonardoadame leonardoadame mentioned this pull request Dec 19, 2023
[Snyk] Fix for 4 vulnerabilities leonardoadame/node#583
Open
@ryan-ally ryan-ally mentioned this pull request Dec 19, 2023
[Snyk] Fix for 6 vulnerabilities ryan-ally/node#98
Open
@aliscco aliscco mentioned this pull request Dec 20, 2023
[Snyk] Fix for 6 vulnerabilities aliscco/alisco-node#1174
Open
@baby636 baby636 mentioned this pull request Dec 20, 2023
[Snyk] Fix for 6 vulnerabilities baby636/node#124
Open
This was referenced Dec 20, 2023
[Snyk] Fix for 6 vulnerabilities MaxMood96/node#40
Open
[Snyk] Fix for 6 vulnerabilities Mement-Mori/node#36
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

tls Issues and PRs related to the tls subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mansona @mscdex @targos
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.