Security field validation: disclose missing field name
This commit is contained in:
parent
5685490048
commit
8ca4c1a791
@ -68,7 +68,7 @@ export default abstract class ApplicationComponent<T> {
|
||||
|
||||
protected checkSecurityConfigField(field: string) {
|
||||
if (!config.has(field) || config.get<string>(field) === 'default') {
|
||||
throw new SecurityError('field not configured.');
|
||||
throw new SecurityError(`${field} field not configured.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user