mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Prevent prototype pollution in task runner (#12588)
This commit is contained in:
@@ -118,13 +118,14 @@ describe('TaskRunnerProcess', () => {
|
||||
expect(options.env).not.toHaveProperty('NODE_OPTIONS');
|
||||
});
|
||||
|
||||
it('should use --disallow-code-generation-from-strings flag', async () => {
|
||||
it('should use --disallow-code-generation-from-strings and --disable-proto=delete flags', async () => {
|
||||
jest.spyOn(authService, 'createGrantToken').mockResolvedValue('grantToken');
|
||||
|
||||
await taskRunnerProcess.start();
|
||||
|
||||
expect(spawnMock.mock.calls[0].at(1)).toEqual([
|
||||
'--disallow-code-generation-from-strings',
|
||||
'--disable-proto=delete',
|
||||
expect.stringContaining('/packages/@n8n/task-runner/dist/start.js'),
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user