Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/api/integrations/chatbot/n8n/services/n8n.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class N8nService extends BaseChatbotService<N8n, N8nSetting> {
pushName: pushName,
keyId: msg?.key?.id,
fromMe: msg?.key?.fromMe,
quotedMessage: msg?.contextInfo?.quotedMessage,
instanceName: instance.instanceName,
serverUrl: this.configService.get<HttpServer>('SERVER').URL,
apiKey: instance.token,
Expand Down
7 changes: 5 additions & 2 deletions src/utils/makeProxyAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function makeProxyAgent(proxy: Proxy | string): HttpsProxyAgent<string> |
return selectProxyAgent(proxyUrl);
}

export function makeProxyAgentUndici(proxy: Proxy | string) {
export function makeProxyAgentUndici(proxy: Proxy | string): ProxyAgent {
let proxyUrl: string;
let protocol: string;

Expand All @@ -67,7 +67,10 @@ export function makeProxyAgentUndici(proxy: Proxy | string) {
} else {
const { host, password, port, protocol: proto, username } = proxy;

Check failure

Code scanning / CodeQL

Insecure randomness High

This uses a cryptographically insecure random number generated at
Math.random()
in a security context.

Check failure

Code scanning / CodeQL

Insecure randomness High

This uses a cryptographically insecure random number generated at
Math.random()
in a security context.

Check failure

Code scanning / CodeQL

Insecure randomness High

This uses a cryptographically insecure random number generated at
Math.random()
in a security context.

Check failure

Code scanning / CodeQL

Insecure randomness High

This uses a cryptographically insecure random number generated at
Math.random()
in a security context.

Check failure

Code scanning / CodeQL

Insecure randomness High

This uses a cryptographically insecure random number generated at
Math.random()
in a security context.
protocol = (proto || 'http').replace(':', '');
if (protocol === 'socks') protocol = 'socks5';

if (protocol === 'socks') {
protocol = 'socks5';
}

const auth = username && password ? `${username}:${password}@` : '';
proxyUrl = `${protocol}://${auth}${host}:${port}`;
Expand Down