Skip to content

Commit

Permalink
fix: invalid path validation
Browse files Browse the repository at this point in the history
  • Loading branch information
hentrymartin committed Dec 19, 2024
1 parent ef0c69a commit 4de7291
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const getTimestamp = async () => {
let timestamp;
try {
const filePath = path.resolve(__dirname, '../../.build-info');
if (!filePath.startsWith(path.resolve(__dirname))) {
if (!filePath.startsWith(path.resolve(__dirname, '../../'))) {
throw new Error('Invalid file path detected');
}

Expand Down

0 comments on commit 4de7291

Please sign in to comment.