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

fix(providers): add SSL renegotiation for Gupshup #5607

Open
wants to merge 3 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
124 changes: 0 additions & 124 deletions .github/workflows/community-releases.yml

This file was deleted.

9 changes: 8 additions & 1 deletion packages/providers/src/lib/gupshup/gupshup.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
ISmsProvider,
} from '@novu/stateless';
import axios from 'axios';
import { constants } from "crypto";
import { Agent } from "https";

if (!globalThis.fetch) {
// eslint-disable-next-line global-require
Expand Down Expand Up @@ -44,7 +46,12 @@
}),
};

const response = await axios.post(GupshupSmsProvider.BASE_URL, params);
const response = await axios.post(GupshupSmsProvider.BASE_URL, params, {
httpsAgent: new Agent({
rejectUnauthorized: false,

Check failure

Code scanning / CodeQL

Disabling certificate validation High

Disabling certificate validation is strongly discouraged.
secureOptions: constants.SSL_OP_LEGACY_SERVER_CONNECT,
}),
});

const body = response.data;
const result = body.split(' | ');
Expand Down