From 5f41b65af1bcc3f25645e32c3f722b914b425158 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 15 Sep 2023 08:41:12 +0530 Subject: [PATCH] chore: Add suppressErrorRendering to secure flags. Co-authored-by: Alois Klink --- cypress/platform/suppressError.html | 18 ++++++++++++++++++ .../mermaid/src/schemas/config.schema.yaml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/cypress/platform/suppressError.html b/cypress/platform/suppressError.html index bfaf76ed2..19e8da22d 100644 --- a/cypress/platform/suppressError.html +++ b/cypress/platform/suppressError.html @@ -21,6 +21,24 @@
   flowchart
       a[This should be visible]
+    
+
+  ---
+  config:
+    suppressErrorRendering: true # This should not affect anything, as suppressErrorRendering is a secure config
+  ---
+  flowchart
+    a --< b
+    
+
+  ---
+  config:
+    suppressErrorRendering: false # This should not affect anything, as suppressErrorRendering is a secure config
+  ---
+  flowchart
+    a --< b
     
diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index 9f396e2b6..edda2feb1 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -155,7 +155,7 @@ properties: in the current `currentConfig`. This prevents malicious graph directives from overriding a site's default security. - default: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'] + default: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize', 'suppressErrorRendering'] type: array items: type: string