n8n-core 2.13.0 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const config_1 = require("@n8n/config");
7
+ const di_1 = require("@n8n/di");
8
+ const axios_1 = __importDefault(require("axios"));
9
+ const qs_1 = require("qs");
10
+ const axios_utils_1 = require("./axios-utils");
11
+ axios_1.default.defaults.timeout = 300000;
12
+ axios_1.default.defaults.headers.post = {};
13
+ axios_1.default.defaults.headers.put = {};
14
+ axios_1.default.defaults.headers.patch = {};
15
+ axios_1.default.defaults.paramsSerializer = (params) => {
16
+ if (params instanceof URLSearchParams) {
17
+ return params.toString();
18
+ }
19
+ return (0, qs_1.stringify)(params, { arrayFormat: 'indices' });
20
+ };
21
+ axios_1.default.defaults.proxy = false;
22
+ axios_1.default.interceptors.request.use((config) => {
23
+ if (config.data === undefined) {
24
+ config.headers.setContentType(false, false);
25
+ }
26
+ (0, axios_utils_1.setAxiosAgents)(config);
27
+ applyVendorHeaders(config);
28
+ return config;
29
+ });
30
+ function applyVendorHeaders(config) {
31
+ if ([config.url, config.baseURL].some((url) => url?.startsWith('https://api.openai.com/'))) {
32
+ config.headers = {
33
+ ...di_1.Container.get(config_1.AiConfig).openAiDefaultHeaders,
34
+ ...(config.headers ?? {}),
35
+ };
36
+ }
37
+ }
38
+ //# sourceMappingURL=axios-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axios-config.js","sourceRoot":"","sources":["../../../../../src/execution-engine/node-execution-context/utils/request-helpers/axios-config.ts"],"names":[],"mappings":";;;;;AAAA,wCAAuC;AACvC,gCAAoC;AAEpC,kDAA0B;AAC1B,2BAA+B;AAE/B,+CAA+C;AAI/C,eAAK,CAAC,QAAQ,CA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,CAAC,OAAO,IAAI,EAAE,CAAC;SACzB,CAAC;IACH,CAAC;AACF,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { AxiosRequestConfig, AxiosResponse } from 'axios';
2
+ import FormData from 'form-data';
3
+ import type { AgentOptions } from 'https';
4
+ import { type IHttpRequestOptions, type IgnoreStatusErrorConfig } from 'n8n-workflow';
5
+ import type { SsrfBridge } from '../../../../execution-engine';
6
+ export declare function throwIfDomainNotAllowed(configOrUrl: AxiosRequestConfig | string, allowedDomains?: string): void;
7
+ export declare function tryParseUrl(url: string): URL | null;
8
+ export declare function isIgnoreStatusErrorConfig(ignoreHttpStatusErrors: unknown): ignoreHttpStatusErrors is IgnoreStatusErrorConfig;
9
+ export declare function searchForHeader(config: AxiosRequestConfig, headerName: string): string | undefined;
10
+ export declare const getHostFromRequestObject: (requestObject: Partial<{
11
+ url: string;
12
+ uri: string;
13
+ baseURL: string;
14
+ }>) => string | null;
15
+ export declare const getBeforeRedirectFn: (agentOptions: AgentOptions, axiosConfig: AxiosRequestConfig, proxyConfig: IHttpRequestOptions["proxy"] | string | undefined, sendCredentialsOnCrossOriginRedirect: boolean, allowedDomains?: string, ssrfBridge?: SsrfBridge) => (redirectedRequest: Record<string, any>) => void;
16
+ export declare function digestAuthAxiosConfig(axiosConfig: AxiosRequestConfig, response: AxiosResponse, auth: AxiosRequestConfig['auth']): AxiosRequestConfig;
17
+ export declare const createFormDataObject: (data: Record<string, unknown>) => FormData;
18
+ export declare function generateContentLengthHeader(config: AxiosRequestConfig): Promise<void>;
19
+ export declare function getUrlFromProxyConfig(proxyConfig: IHttpRequestOptions['proxy'] | string): string | null;
20
+ export declare function buildTargetUrl(url?: string, baseURL?: string): string | undefined;
21
+ export declare function setAxiosAgents(config: AxiosRequestConfig, agentOptions?: AgentOptions, proxyConfig?: IHttpRequestOptions['proxy'] | string, secureLookup?: ReturnType<SsrfBridge['createSecureLookup']>): void;
@@ -0,0 +1,231 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createFormDataObject = exports.getBeforeRedirectFn = exports.getHostFromRequestObject = void 0;
7
+ exports.throwIfDomainNotAllowed = throwIfDomainNotAllowed;
8
+ exports.tryParseUrl = tryParseUrl;
9
+ exports.isIgnoreStatusErrorConfig = isIgnoreStatusErrorConfig;
10
+ exports.searchForHeader = searchForHeader;
11
+ exports.digestAuthAxiosConfig = digestAuthAxiosConfig;
12
+ exports.generateContentLengthHeader = generateContentLengthHeader;
13
+ exports.getUrlFromProxyConfig = getUrlFromProxyConfig;
14
+ exports.buildTargetUrl = buildTargetUrl;
15
+ exports.setAxiosAgents = setAxiosAgents;
16
+ const backend_common_1 = require("@n8n/backend-common");
17
+ const di_1 = require("@n8n/di");
18
+ const axios_1 = __importDefault(require("axios"));
19
+ const crypto_1 = __importDefault(require("crypto"));
20
+ const form_data_1 = __importDefault(require("form-data"));
21
+ const n8n_workflow_1 = require("n8n-workflow");
22
+ const http_proxy_1 = require("../../../../http-proxy");
23
+ function throwIfDomainNotAllowed(configOrUrl, allowedDomains) {
24
+ const url = typeof configOrUrl === 'string' ? configOrUrl : axios_1.default.getUri(configOrUrl);
25
+ if (allowedDomains && !(0, n8n_workflow_1.isDomainAllowed)(url, { allowedDomains })) {
26
+ throw new n8n_workflow_1.ApplicationError(`Domain not allowed: This credential is restricted from accessing ${url}. Only the following domains are allowed: ${allowedDomains}`);
27
+ }
28
+ }
29
+ function tryParseUrl(url) {
30
+ try {
31
+ return new URL(url);
32
+ }
33
+ catch {
34
+ return null;
35
+ }
36
+ }
37
+ function isIgnoreStatusErrorConfig(ignoreHttpStatusErrors) {
38
+ return (typeof ignoreHttpStatusErrors === 'object' &&
39
+ ignoreHttpStatusErrors !== null &&
40
+ 'ignore' in ignoreHttpStatusErrors &&
41
+ ignoreHttpStatusErrors.ignore === true);
42
+ }
43
+ function searchForHeader(config, headerName) {
44
+ if (config.headers === undefined) {
45
+ return undefined;
46
+ }
47
+ const headerNames = Object.keys(config.headers);
48
+ headerName = headerName.toLowerCase();
49
+ return headerNames.find((thisHeader) => thisHeader.toLowerCase() === headerName);
50
+ }
51
+ const getHostFromRequestObject = (requestObject) => {
52
+ try {
53
+ const url = (requestObject.url ?? requestObject.uri);
54
+ return new URL(url, requestObject.baseURL).hostname;
55
+ }
56
+ catch (error) {
57
+ return null;
58
+ }
59
+ };
60
+ exports.getHostFromRequestObject = getHostFromRequestObject;
61
+ const getBeforeRedirectFn = (agentOptions, axiosConfig, proxyConfig, sendCredentialsOnCrossOriginRedirect, allowedDomains, ssrfBridge) => (redirectedRequest) => {
62
+ throwIfDomainNotAllowed(redirectedRequest.href, allowedDomains);
63
+ if (ssrfBridge) {
64
+ ssrfBridge.validateRedirectSync(redirectedRequest.href);
65
+ }
66
+ const redirectAgentOptions = {
67
+ ...agentOptions,
68
+ servername: redirectedRequest.hostname,
69
+ };
70
+ const customProxyUrl = proxyConfig ? getUrlFromProxyConfig(proxyConfig) : null;
71
+ const effectiveRedirectOptions = ssrfBridge && !customProxyUrl
72
+ ? { ...redirectAgentOptions, lookup: ssrfBridge.createSecureLookup() }
73
+ : redirectAgentOptions;
74
+ const targetUrl = redirectedRequest.href;
75
+ const httpAgent = (0, http_proxy_1.createHttpProxyAgent)(customProxyUrl, targetUrl, effectiveRedirectOptions);
76
+ const httpsAgent = (0, http_proxy_1.createHttpsProxyAgent)(customProxyUrl, targetUrl, effectiveRedirectOptions);
77
+ redirectedRequest.agent = redirectedRequest.href.startsWith('https://')
78
+ ? httpsAgent
79
+ : httpAgent;
80
+ redirectedRequest.agents = { http: httpAgent, https: httpsAgent };
81
+ const originalUrl = axiosConfig.baseURL
82
+ ? new URL(axiosConfig.url ?? '', axiosConfig.baseURL)
83
+ : new URL(axiosConfig.url ?? '');
84
+ const originalOrigin = originalUrl.origin;
85
+ const targetOrigin = new URL(targetUrl).origin;
86
+ if (originalOrigin === targetOrigin || sendCredentialsOnCrossOriginRedirect) {
87
+ if (axiosConfig.headers?.Authorization) {
88
+ redirectedRequest.headers.Authorization = axiosConfig.headers.Authorization;
89
+ }
90
+ if (axiosConfig.auth) {
91
+ redirectedRequest.auth = `${axiosConfig.auth.username}:${axiosConfig.auth.password}`;
92
+ }
93
+ }
94
+ };
95
+ exports.getBeforeRedirectFn = getBeforeRedirectFn;
96
+ function digestAuthAxiosConfig(axiosConfig, response, auth) {
97
+ const authDetails = response.headers['www-authenticate']
98
+ .split(',')
99
+ .map((v) => v.split('='));
100
+ if (authDetails) {
101
+ const nonceCount = '000000001';
102
+ const cnonce = crypto_1.default.randomBytes(24).toString('hex');
103
+ const realm = authDetails
104
+ .find((el) => el[0].toLowerCase().indexOf('realm') > -1)[1]
105
+ .replace(/"/g, '');
106
+ const opaqueKV = authDetails.find((el) => el[0].toLowerCase().indexOf('opaque') > -1);
107
+ const opaque = opaqueKV ? opaqueKV[1].replace(/"/g, '') : undefined;
108
+ const nonce = authDetails
109
+ .find((el) => el[0].toLowerCase().indexOf('nonce') > -1)[1]
110
+ .replace(/"/g, '');
111
+ const ha1 = crypto_1.default
112
+ .createHash('md5')
113
+ .update(`${auth?.username}:${realm}:${auth?.password}`)
114
+ .digest('hex');
115
+ const url = new URL(axios_1.default.getUri(axiosConfig));
116
+ const path = url.pathname + url.search;
117
+ const ha2 = crypto_1.default
118
+ .createHash('md5')
119
+ .update(`${axiosConfig.method ?? 'GET'}:${path}`)
120
+ .digest('hex');
121
+ const response = crypto_1.default
122
+ .createHash('md5')
123
+ .update(`${ha1}:${nonce}:${nonceCount}:${cnonce}:auth:${ha2}`)
124
+ .digest('hex');
125
+ let authorization = `Digest username="${auth?.username}",realm="${realm}",` +
126
+ `nonce="${nonce}",uri="${path}",qop="auth",algorithm="MD5",` +
127
+ `response="${response}",nc="${nonceCount}",cnonce="${cnonce}"`;
128
+ if (opaque) {
129
+ authorization += `,opaque="${opaque}"`;
130
+ }
131
+ if (axiosConfig.headers) {
132
+ axiosConfig.headers.authorization = authorization;
133
+ }
134
+ else {
135
+ axiosConfig.headers = { authorization };
136
+ }
137
+ }
138
+ return axiosConfig;
139
+ }
140
+ const pushFormDataValue = (form, key, value) => {
141
+ if (value?.hasOwnProperty('value') && value.hasOwnProperty('options')) {
142
+ form.append(key, value.value, value.options);
143
+ }
144
+ else {
145
+ form.append(key, value);
146
+ }
147
+ };
148
+ const createFormDataObject = (data) => {
149
+ const formData = new form_data_1.default();
150
+ const keys = Object.keys(data);
151
+ keys.forEach((key) => {
152
+ const formField = data[key];
153
+ if (formField instanceof Array) {
154
+ formField.forEach((item) => {
155
+ pushFormDataValue(formData, key, item);
156
+ });
157
+ }
158
+ else {
159
+ pushFormDataValue(formData, key, formField);
160
+ }
161
+ });
162
+ return formData;
163
+ };
164
+ exports.createFormDataObject = createFormDataObject;
165
+ async function generateContentLengthHeader(config) {
166
+ if (!(config.data instanceof form_data_1.default)) {
167
+ return;
168
+ }
169
+ try {
170
+ const length = await new Promise((res, rej) => {
171
+ config.data.getLength((error, dataLength) => {
172
+ if (error)
173
+ rej(error);
174
+ else
175
+ res(dataLength);
176
+ });
177
+ });
178
+ config.headers = {
179
+ ...config.headers,
180
+ 'content-length': length,
181
+ };
182
+ }
183
+ catch (error) {
184
+ di_1.Container.get(backend_common_1.Logger).error('Unable to calculate form data length', { error });
185
+ }
186
+ }
187
+ function getUrlFromProxyConfig(proxyConfig) {
188
+ if (typeof proxyConfig === 'string') {
189
+ const isValidUrl = !!tryParseUrl(proxyConfig);
190
+ return isValidUrl ? proxyConfig : null;
191
+ }
192
+ if (!proxyConfig?.host)
193
+ return null;
194
+ const { protocol, host, port, auth } = proxyConfig;
195
+ const safeProtocol = protocol?.endsWith(':') ? protocol.slice(0, -1) : (protocol ?? 'http');
196
+ try {
197
+ const url = new URL(`${safeProtocol}://${host}`);
198
+ if (port !== undefined)
199
+ url.port = String(port);
200
+ if (auth?.username) {
201
+ url.username = auth.username;
202
+ url.password = auth.password ?? '';
203
+ }
204
+ return url.href;
205
+ }
206
+ catch {
207
+ return null;
208
+ }
209
+ }
210
+ function buildTargetUrl(url, baseURL) {
211
+ if (!url)
212
+ return undefined;
213
+ try {
214
+ return baseURL ? new URL(url, baseURL).href : url;
215
+ }
216
+ catch {
217
+ return undefined;
218
+ }
219
+ }
220
+ function setAxiosAgents(config, agentOptions, proxyConfig, secureLookup) {
221
+ if (config.httpAgent || config.httpsAgent)
222
+ return;
223
+ const customProxyUrl = getUrlFromProxyConfig(proxyConfig);
224
+ const targetUrl = buildTargetUrl(config.url, config.baseURL);
225
+ if (!targetUrl)
226
+ return;
227
+ const effectiveOptions = secureLookup && !customProxyUrl ? { ...agentOptions, lookup: secureLookup } : agentOptions;
228
+ config.httpAgent = (0, http_proxy_1.createHttpProxyAgent)(customProxyUrl, targetUrl, effectiveOptions);
229
+ config.httpsAgent = (0, http_proxy_1.createHttpsProxyAgent)(customProxyUrl, targetUrl, effectiveOptions);
230
+ }
231
+ //# sourceMappingURL=axios-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axios-utils.js","sourceRoot":"","sources":["../../../../../src/execution-engine/node-execution-context/utils/request-helpers/axios-utils.ts"],"names":[],"mappings":";;;;;;AAiBA,0DAUC;AAGD,kCAMC;AAGD,8DASC;AAGD,0CAQC;AA6ED,sDAiDC;AA8BD,kEAoBC;AAGD,sDAwBC;AAGD,wCAQC;AAGD,wCAsBC;AA1SD,wDAA6C;AAC7C,gCAAoC;AAEpC,kDAA0B;AAC1B,oDAA4B;AAC5B,0DAAiC;AAEjC,+CAKsB;AAGtB,6CAA2E;AAE3E,SAAgB,uBAAuB,CACtC,WAAwC,EACxC,cAAuB;IAEvB,MAAM,GAAG,GAAG,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,eAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACtF,IAAI,cAAc,IAAI,CAAC,IAAA,8BAA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CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC;AAGD,SAAgB,cAAc,CAC7B,MAA0B,EAC1B,YAA2B,EAC3B,WAAmD,EACnD,YAA2D;IAE3D,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,UAAU;QAAE,OAAO;IAElD,MAAM,cAAc,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAE1D,MAAM,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAE7D,IAAI,CAAC,SAAS;QAAE,OAAO;IAKvB,MAAM,gBAAgB,GACrB,YAAY,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,GAAG,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;IAE5F,MAAM,CAAC,SAAS,GAAG,IAAA,iCAAoB,EAAC,cAAc,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC;IACrF,MAAM,CAAC,UAAU,GAAG,IAAA,kCAAqB,EAAC,cAAc,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC;AACxF,CAAC"}
@@ -0,0 +1 @@
1
+ export { createFormDataObject, digestAuthAxiosConfig, generateContentLengthHeader, getBeforeRedirectFn, getHostFromRequestObject, isIgnoreStatusErrorConfig, searchForHeader, tryParseUrl, buildTargetUrl, getUrlFromProxyConfig, setAxiosAgents, } from './axios-utils';
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setAxiosAgents = exports.getUrlFromProxyConfig = exports.buildTargetUrl = exports.tryParseUrl = exports.searchForHeader = exports.isIgnoreStatusErrorConfig = exports.getHostFromRequestObject = exports.getBeforeRedirectFn = exports.generateContentLengthHeader = exports.digestAuthAxiosConfig = exports.createFormDataObject = void 0;
4
+ var axios_utils_1 = require("./axios-utils");
5
+ Object.defineProperty(exports, "createFormDataObject", { enumerable: true, get: function () { return axios_utils_1.createFormDataObject; } });
6
+ Object.defineProperty(exports, "digestAuthAxiosConfig", { enumerable: true, get: function () { return axios_utils_1.digestAuthAxiosConfig; } });
7
+ Object.defineProperty(exports, "generateContentLengthHeader", { enumerable: true, get: function () { return axios_utils_1.generateContentLengthHeader; } });
8
+ Object.defineProperty(exports, "getBeforeRedirectFn", { enumerable: true, get: function () { return axios_utils_1.getBeforeRedirectFn; } });
9
+ Object.defineProperty(exports, "getHostFromRequestObject", { enumerable: true, get: function () { return axios_utils_1.getHostFromRequestObject; } });
10
+ Object.defineProperty(exports, "isIgnoreStatusErrorConfig", { enumerable: true, get: function () { return axios_utils_1.isIgnoreStatusErrorConfig; } });
11
+ Object.defineProperty(exports, "searchForHeader", { enumerable: true, get: function () { return axios_utils_1.searchForHeader; } });
12
+ Object.defineProperty(exports, "tryParseUrl", { enumerable: true, get: function () { return axios_utils_1.tryParseUrl; } });
13
+ Object.defineProperty(exports, "buildTargetUrl", { enumerable: true, get: function () { return axios_utils_1.buildTargetUrl; } });
14
+ Object.defineProperty(exports, "getUrlFromProxyConfig", { enumerable: true, get: function () { return axios_utils_1.getUrlFromProxyConfig; } });
15
+ Object.defineProperty(exports, "setAxiosAgents", { enumerable: true, get: function () { return axios_utils_1.setAxiosAgents; } });
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/execution-engine/node-execution-context/utils/request-helpers/index.ts"],"names":[],"mappings":";;;AAAA,6CAYuB;AAXtB,mHAAA,oBAAoB,OAAA;AACpB,oHAAA,qBAAqB,OAAA;AACrB,0HAAA,2BAA2B,OAAA;AAC3B,kHAAA,mBAAmB,OAAA;AACnB,uHAAA,wBAAwB,OAAA;AACxB,wHAAA,yBAAyB,OAAA;AACzB,8GAAA,eAAe,OAAA;AACf,0GAAA,WAAW,OAAA;AACX,6GAAA,cAAc,OAAA;AACd,oHAAA,qBAAqB,OAAA;AACrB,6GAAA,cAAc,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-core",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
4
4
  "description": "Core functionality of n8n",
5
5
  "main": "dist/index",
6
6
  "types": "dist/index.d.ts",
@@ -13,8 +13,8 @@
13
13
  "files": [
14
14
  "dist",
15
15
  "bin",
16
- "LICENSE_EE.md",
17
- "LICENSE.md"
16
+ "LICENSE.md",
17
+ "LICENSE_EE.md"
18
18
  ],
19
19
  "devDependencies": {
20
20
  "@types/express": "^5.0.1",
@@ -60,14 +60,14 @@
60
60
  "winston": "3.14.2",
61
61
  "xml2js": "0.6.2",
62
62
  "zod": "3.25.67",
63
+ "@n8n/backend-common": "1.13.1",
63
64
  "@n8n/client-oauth2": "1.0.0",
64
- "@n8n/config": "2.12.0",
65
- "@n8n/backend-common": "1.13.0",
65
+ "@n8n/config": "2.12.1",
66
66
  "@n8n/constants": "0.19.0",
67
- "@n8n/decorators": "1.13.0",
68
- "@n8n/di": "0.10.0",
69
- "@n8n/workflow-sdk": "0.6.0",
70
- "n8n-workflow": "2.13.0"
67
+ "@n8n/decorators": "1.13.1",
68
+ "@n8n/workflow-sdk": "0.6.1",
69
+ "n8n-workflow": "2.13.1",
70
+ "@n8n/di": "0.10.0"
71
71
  },
72
72
  "license": "SEE LICENSE IN LICENSE.md",
73
73
  "homepage": "https://n8n.io",