Skip to content
Snippets Groups Projects
Unverified Commit 60a7de50 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

chore: avoid use of confusing base dir term in log (#27659)

parent 12773c66
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment