From 0e0802a5889f58e89cb1b5bd1cf465980029e8da Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Mon, 22 Aug 2022 17:48:09 +0200 Subject: [PATCH] Update src/config.ts Agree! Co-authored-by: Sidharth Vinod --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 6df5fa249..20843ccbc 100644 --- a/src/config.ts +++ b/src/config.ts @@ -151,7 +151,7 @@ export const getConfig = (): MermaidConfig => { */ export const sanitize = (options: any) => { // Checking that options are not in the list of excluded options - siteConfig.secure?.forEach((key) => { + ['secure', ...(siteConfig.secure ?? [])].forEach((key) => { if (typeof options[key] !== 'undefined') { // DO NOT attempt to print options[key] within `${}` as a malicious script // can exploit the logger's attempt to stringify the value and execute arbitrary code