mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Update packages to address CVE-2023-2142 and CVE-2020-28469 (#6844)
GH Advisories: [ CVE-2023-2142](https://github.com/advisories/GHSA-x77j-w7wf-fjmw) [CVE-2020-28469](https://github.com/advisories/GHSA-ww39-953v-wcq6) --------- Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
committed by
GitHub
parent
6ec7033bb7
commit
a5667e6c42
@@ -7,7 +7,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import mqtt from 'mqtt';
|
||||
import * as mqtt from 'mqtt';
|
||||
|
||||
export class MqttTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
@@ -142,9 +142,9 @@ export class MqttTrigger implements INodeType {
|
||||
const manualTriggerFunction = async () => {
|
||||
await new Promise((resolve, reject) => {
|
||||
client.on('connect', () => {
|
||||
client.subscribe(topicsQoS as mqtt.ISubscriptionMap, (err, _granted) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
client.subscribe(topicsQoS as mqtt.ISubscriptionMap, (error, _granted) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
}
|
||||
client.on('message', (topic: string, message: Buffer | string) => {
|
||||
let result: IDataObject = {};
|
||||
@@ -154,7 +154,7 @@ export class MqttTrigger implements INodeType {
|
||||
if (options.jsonParseBody) {
|
||||
try {
|
||||
message = JSON.parse(message.toString());
|
||||
} catch (error) {}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
result.message = message;
|
||||
|
||||
Reference in New Issue
Block a user