Skip to content

Commit

Permalink
fix(storage-server/cache-api-response): resolve path
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm authored and AliMD committed May 8, 2023
1 parent 2ac29a9 commit ae10ebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/storage-server/src/route/cache-api-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ nanoServer.route('PUT', '/cache-api-response', async (connection) => {
const bodyJson = await connection.requireJsonBody<{ path: string; data: StringifyableRecord }>();

const base = config.storage.path;
const path = resolve(base, bodyJson.path, '.json');
const path = resolve(base, bodyJson.path, '/.json');

if (!path.startsWith(base)) {
return {
Expand Down

0 comments on commit ae10ebd

Please sign in to comment.