From d5a6103073b9b8ab89077ff783de18a69bea64b8 Mon Sep 17 00:00:00 2001 From: zg009 <103973669+zg009@users.noreply.github.com> Date: Thu, 21 Mar 2024 13:53:09 -0500 Subject: [PATCH 1/3] Update lib/handlers/put.js Co-authored-by: Ted Thibodeau Jr --- lib/handlers/put.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/handlers/put.js b/lib/handlers/put.js index a85a56a0..05bf8b30 100644 --- a/lib/handlers/put.js +++ b/lib/handlers/put.js @@ -20,7 +20,7 @@ function containsInvalidSuffixes (path) { if (path.endsWith('/')) { path = path.slice(0, -1) } else { - // this is a resource, so it either ends with an extension, or just text + // this is a resource, so it either ends with an extension, or is just text const lastFullStop = path.lastIndexOf('.') if (lastFullStop !== -1) { // contains at least one full stop path = path.slice(0, lastFullStop) From 1a8987e9ca369885f6d263e455eb12e85dfe9d24 Mon Sep 17 00:00:00 2001 From: zg009 <103973669+zg009@users.noreply.github.com> Date: Thu, 21 Mar 2024 13:53:17 -0500 Subject: [PATCH 2/3] Update lib/handlers/put.js Co-authored-by: Ted Thibodeau Jr --- lib/handlers/put.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/handlers/put.js b/lib/handlers/put.js index 05bf8b30..958c85d1 100644 --- a/lib/handlers/put.js +++ b/lib/handlers/put.js @@ -10,8 +10,8 @@ const { stringToStream } = require('../utils') const RESERVED_SUFFIXES = ['.acl', '.meta'] /** - * This function is used to make sure a resource or container which contains - * reserved suffixes for auxiliary documents cannot be created. + * This function is used to prevent creation of a resource or container + * which contains auxiliary documents named with reserved suffixes. * @param {string} path - the uri to check for invalid suffixes * @returns {boolean} true is fail - if the path contains reserved suffixes */ From 08886afa474cf29752e33f2dfdc64abe93293101 Mon Sep 17 00:00:00 2001 From: zg009 <103973669+zg009@users.noreply.github.com> Date: Thu, 21 Mar 2024 13:53:26 -0500 Subject: [PATCH 3/3] Update lib/handlers/put.js Co-authored-by: Ted Thibodeau Jr --- lib/handlers/put.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/handlers/put.js b/lib/handlers/put.js index 958c85d1..b2583e06 100644 --- a/lib/handlers/put.js +++ b/lib/handlers/put.js @@ -16,7 +16,7 @@ const RESERVED_SUFFIXES = ['.acl', '.meta'] * @returns {boolean} true is fail - if the path contains reserved suffixes */ function containsInvalidSuffixes (path) { - // if it is a container, no suffix so remove last slash + // if it is a container, no suffix, so remove last slash if (path.endsWith('/')) { path = path.slice(0, -1) } else {