-
Notifications
You must be signed in to change notification settings - Fork 306
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
test send-notification only endpoint is failing in Node.js 11 #402
Comments
Hi, if this bug is still open could I work on it? |
@spikerheado1234 sure! Issues are assigned when there is a PR to fix them. |
Ok sure I'll have a crack at it. Since it is my first time contributing to a large open source project I may need a little help. |
@spikerheado1234 if you are not working on the bug can you please comment ! I would like to work on this |
Anyone can work on any open issue which is not assigned and which has no PR open linked to it. |
I will try this out =D. Its my first time too! |
@marco-c , I installed node 11.12.0 and saw that the tests pass fine, just the warning is been logged in the middle of the suite. We can add a --no-warnings param at the command. Doing that, this stop. Is this a good solution? If so, how can I open the PR? Should I fork? |
I don't like ignoring warnings altogether, as otherwise we could miss something important in the future. I think you'll have to somehow modify web-push/test/testSendNotification.js Line 449 in 5388395
|
@marco-c, I made some try here but it seens that we just cant dont log this warning. This is the code which prints the warning: let warnOnAllowUnauthorized = true;
// Arguments: [port,] [host,] [options,] [cb]
exports.connect = function connect(...args) {
args = normalizeConnectArgs(args);
var options = args[0];
var cb = args[1];
const allowUnauthorized = process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0';
if (allowUnauthorized && warnOnAllowUnauthorized) {
warnOnAllowUnauthorized = false;
process.emitWarning('Setting the NODE_TLS_REJECT_UNAUTHORIZED ' +
'environment variable to \'0\' makes TLS connections ' +
'and HTTPS requests insecure by disabling ' +
'certificate verification.');
} This was add on this PR: nodejs/node#21900 It seens to affect only Node 11.12.0, which is the current version. |
We need to try to stop using NODE_TLS_REJECT_UNAUTHORIZED entirely (so the warning won't apply anymore), by modifying the code I pointed at earlier. |
…t self-signed certificate and use rejectUnauthorized option instead Fixes #402
No description provided.
The text was updated successfully, but these errors were encountered: