Application file storage service (#20793)

# Introduction
Fix unsafe resource path join with expected prefix at file storage
directly
Add early paths transversal detections in metadata validators
This commit is contained in:
Paul Rastoin
2026-05-21 11:21:44 +02:00
committed by GitHub
parent 1ed347bc17
commit a3c92311e3
20 changed files with 1661 additions and 5 deletions
@@ -18,6 +18,7 @@ export enum LogicFunctionExceptionCode {
LOGIC_FUNCTION_LAYER_BUILD_FAILED = 'LOGIC_FUNCTION_LAYER_BUILD_FAILED',
LOGIC_FUNCTION_DISABLED = 'LOGIC_FUNCTION_DISABLED',
LOGIC_FUNCTION_INVALID_SEED_PROJECT = 'LOGIC_FUNCTION_INVALID_SEED_PROJECT',
INVALID_LOGIC_FUNCTION_INPUT = 'INVALID_LOGIC_FUNCTION_INPUT',
}
const getLogicFunctionExceptionUserFriendlyMessage = (
@@ -50,6 +51,8 @@ const getLogicFunctionExceptionUserFriendlyMessage = (
return msg`Logic function execution is disabled.`;
case LogicFunctionExceptionCode.LOGIC_FUNCTION_INVALID_SEED_PROJECT:
return msg`Invalid seed project configuration.`;
case LogicFunctionExceptionCode.INVALID_LOGIC_FUNCTION_INPUT:
return msg`Invalid logic function input.`;
default:
assertUnreachable(code);
}
@@ -33,6 +33,7 @@ export const logicFunctionGraphQLApiExceptionHandler = (error: any) => {
case LogicFunctionExceptionCode.LOGIC_FUNCTION_LAYER_BUILD_FAILED:
throw error;
case LogicFunctionExceptionCode.LOGIC_FUNCTION_COMPILATION_FAILED:
case LogicFunctionExceptionCode.INVALID_LOGIC_FUNCTION_INPUT:
throw new UserInputError(error);
case LogicFunctionExceptionCode.LOGIC_FUNCTION_DISABLED:
throw new ForbiddenError(error);