fix(core): Handle symlinks in blocked paths (#17735)

This commit is contained in:
RomanDavydchuk
2025-08-01 10:59:53 +03:00
committed by GitHub
parent e8e7b23d47
commit c2c3e08cdf
5 changed files with 64 additions and 40 deletions

View File

@@ -7,6 +7,8 @@ describe('Test Crypto Node', () => {
jest.mock('fast-glob', () => async () => ['/test/binary.data']);
jest.mock('fs/promises');
fsPromises.access = async () => {};
const realpathSpy = jest.spyOn(fsPromises, 'realpath');
realpathSpy.mockImplementation(async (path) => path as string);
jest.mock('fs');
fs.createReadStream = () => Readable.from(Buffer.from('test')) as fs.ReadStream;