From c3abc3ac44bfee4565dceacbc816eec44873ed93 Mon Sep 17 00:00:00 2001 From: larry-internxt Date: Wed, 18 Sep 2024 17:25:20 +0200 Subject: [PATCH] added parentFolderId check on folder creation --- src/app/services/folder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/services/folder.js b/src/app/services/folder.js index c98b27b6..536cdd57 100644 --- a/src/app/services/folder.js +++ b/src/app/services/folder.js @@ -56,7 +56,7 @@ module.exports = (Model, App) => { // Create folder entry, for desktop const Create = async (user, folderName, parentFolderId, teamId = null, uuid = null) => { - if (parentFolderId >= 2147483648) { + if (!parentFolderId || isNaN(parentFolderId) || parentFolderId >= 2147483648) { throw Error('Invalid parent folder'); } // parent folder is yours?