-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat #5042: Add flowchart.maxEdges
config.
#5086
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #5086 +/- ##
===========================================
- Coverage 76.16% 76.06% -0.10%
===========================================
Files 166 166
Lines 13877 13878 +1
Branches 705 705
===========================================
- Hits 10569 10556 -13
- Misses 3146 3151 +5
- Partials 162 171 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@knsv I'm not sure if the limit being configurable would cause issues. Should it be added to the secure list, so it cannot be modified in the diagram? |
It should be added to the configuration, and just as you mentioned, it needs to be added to the secure list. If not a malicious diagram author could still bring a page down. With that, I will be happy to include this! Good one! |
Any diagram could be vulnerable, but the difference for flowcharts is the concise way to create many edges as in: A reasonable limit is tricky to set, so a configuration is a good idea. As for the other diagrams, we could cover those when we align the rendering between the graph-based diagrams. |
@knsv added maxEdges to secure, and moved it to root config level, as this might be applicable for other diagrams too. |
Is "Bumps up max edges to 500 (can lower if there is issue)." means we cannot configure more, but only less? "Add a flowchart.maxEdges config to allow modifying this limit." Will this work ? What is the reason behind such limit and the few others in Mermaid)? Wouldn' JS or the browser simply fails id something exceeds its limits? |
@jvieille
The browser tab will hang when the number of edges is high. This is a problem for websites that display 3rd party content, as someone can break the page. |
📑 Summary
maxEdges
config to allow modifying this limit.Resolves #5042
📏 Design Decisions
Now the error thrown will help to set the config.
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch