From 60a7de5032f40f60f63a8af5ade0ca59d29694d8 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Fri, 1 Mar 2024 11:57:30 +0100 Subject: [PATCH] chore: avoid use of confusing base dir term in log (#27659) --- lib/util/fs/util.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/util/fs/util.ts b/lib/util/fs/util.ts index cbe8afae07..2a15c048a0 100644 --- a/lib/util/fs/util.ts +++ b/lib/util/fs/util.ts @@ -3,11 +3,11 @@ import { GlobalConfig } from '../../config/global'; import { FILE_ACCESS_VIOLATION_ERROR } from '../../constants/error-messages'; import { logger } from '../../logger'; -function assertBaseDir(path: string, baseDir: string): void { - if (!path.startsWith(baseDir)) { +function assertBaseDir(path: string, allowedDir: string): void { + if (!path.startsWith(allowedDir)) { logger.debug( - { path, baseDir }, - 'Preventing access to file outside the base directory', + { path, allowedDir }, + 'Preventing access to file outside allowed directory', ); throw new Error(FILE_ACCESS_VIOLATION_ERROR); } -- GitLab