From 8ca4c1a79188a44e9f31ece0428e5a950a9495c3 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 29 Jul 2020 16:16:42 +0200 Subject: [PATCH] Security field validation: disclose missing field name --- src/ApplicationComponent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ApplicationComponent.ts b/src/ApplicationComponent.ts index 1482e73..4feaa59 100644 --- a/src/ApplicationComponent.ts +++ b/src/ApplicationComponent.ts @@ -68,7 +68,7 @@ export default abstract class ApplicationComponent { protected checkSecurityConfigField(field: string) { if (!config.has(field) || config.get(field) === 'default') { - throw new SecurityError('field not configured.'); + throw new SecurityError(`${field} field not configured.`); } } }