Update src/config.ts

Agree!

Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
This commit is contained in:
Knut Sveidqvist 2022-08-22 17:48:09 +02:00 committed by GitHub
parent 9a0d5e31b7
commit 0e0802a588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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