diff --git a/apps/dokploy/__test__/drop/drop.test.ts b/apps/dokploy/__test__/drop/drop.test.ts index b35f141c0..e0277cfed 100644 --- a/apps/dokploy/__test__/drop/drop.test.ts +++ b/apps/dokploy/__test__/drop/drop.test.ts @@ -250,7 +250,7 @@ describe("security: zip symlink entry blocked", () => { const file = new File([zipBuffer as any], "exploit.zip"); await expect(unzipDrop(file, { ...baseApp, appName })).rejects.toThrow( - /Symlink entries are not allowed/, + /Dangerous node entries are not allowed/, ); }); }); diff --git a/packages/server/src/utils/builders/drop.ts b/packages/server/src/utils/builders/drop.ts index e1c2a1e32..e5298a839 100644 --- a/packages/server/src/utils/builders/drop.ts +++ b/packages/server/src/utils/builders/drop.ts @@ -69,10 +69,6 @@ export const unzipDrop = async (zipFile: File, application: Application) => { ); } - if (isSymlinkEntry(entry)) { - throw new Error(`Symlink entries are not allowed: ${entry.entryName}`); - } - if (isDangerousNode(entry)) { throw new Error( `Dangerous node entries are not allowed: ${entry.entryName}`, @@ -149,12 +145,6 @@ const uploadFileToServer = ( }); }; -function isSymlinkEntry(entry: AdmZip.IZipEntry) { - // upper 16 bits = unix permissions - const unix = (entry.header.attr >> 16) & 0o170000; - return unix === 0o120000; -} - function isDangerousNode(entry: AdmZip.IZipEntry) { const type = (entry.header.attr >> 16) & 0o170000;