mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): App should not crash with a custom rest endpoint (#5911)
fixes #5880
This commit is contained in:
committed by
GitHub
parent
6689451e8c
commit
2881ee9ecc
@@ -10,7 +10,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
|
||||
import assert from 'assert';
|
||||
import { exec as callbackExec } from 'child_process';
|
||||
import { access as fsAccess } from 'fs/promises';
|
||||
import os from 'os';
|
||||
@@ -452,6 +452,11 @@ class Server extends AbstractServer {
|
||||
...excludeEndpoints.split(':'),
|
||||
].filter((u) => !!u);
|
||||
|
||||
assert(
|
||||
!ignoredEndpoints.includes(this.restEndpoint),
|
||||
`REST endpoint cannot be set to any of these values: ${ignoredEndpoints.join()} `,
|
||||
);
|
||||
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const authIgnoreRegex = new RegExp(`^\/(${ignoredEndpoints.join('|')})\/?.*$`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user