Skip to content
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

Disabling SSL verification when SSL is not required leads to HTTPS request #87

Open
EagleAdam opened this issue Nov 14, 2020 · 0 comments

Comments

@EagleAdam
Copy link

I initially had this in my actions file that I had written by hand:

{
  "Home Assistant": {
    "type": "home_assistant",
    "host": "172.16.0.51",
    "port": "8123",
    "ssl": false,
    "verify_ssl": false,
    "token": "......"
  }
}

As a result, I got an error:

[1] Found card: 43535. Processing...
[1] Processing action: Home Assistant
[1] Error [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"
[1]     at new ClientRequest (_http_client.js:132:11)
[1]     at request (http.js:41:10)
[1]     at /usr/src/app/scanner/node_modules/node-fetch/lib/index.js:1375:15
[1]     at new Promise (<anonymous>)
[1]     at fetch (/usr/src/app/scanner/node_modules/node-fetch/lib/index.js:1367:9)
[1]     at HomeAssistantAction.request (/usr/src/app/scanner/actions/HomeAssistantAction.js:50:12)
[1]     at HomeAssistantAction.process (/usr/src/app/scanner/actions/HomeAssistantAction.js:7:10)
[1]     at CardProcessor.processCard (/usr/src/app/scanner/CardProcessor.js:55:23)
[1]     at CardProcessor.process (/usr/src/app/scanner/CardProcessor.js:19:10)
[1]     at Keyboard.<anonymous> (/usr/src/app/scanner/scanner.js:17:19)

I now understand that in #6406abf as a result of allowing the option to disable SSL verification, if that option is set to false (even if ssl is set to false) then it tries to make an HTTPS request.

If SSL is set to false, then presumably verify_ssl should be ignored?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant