From 86091f77cf4cf0069a810b14598a575b5928b878 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 17:41:52 +0000 Subject: [PATCH] feat: Security and i18n improvements for Smart Mind Map plugin - Fixed high-severity XSS and JS injection vulnerabilities by safely escaping IDs and user input using `json.dumps` and HTML entity encoding. - Prevented potential DoS crashes caused by curly braces in LLM output by replacing `.format()` with safe string replacement. - Refactored language resolution into a `_resolve_language` helper method, implementing base language fallback (e.g., `fr-BE` -> `fr-FR`). - Refactored date formatting to use a cleaner, dictionary-based approach. - Consolidated i18n logic into a single file with robust fallback handling. - Verified all changes with comprehensive unit and security tests. Co-authored-by: Fu-Jie <33599649+Fu-Jie@users.noreply.github.com> --- .../actions/smart-mind-map/smart_mind_map.py | 460 ++++-------------- 1 file changed, 104 insertions(+), 356 deletions(-) diff --git a/plugins/actions/smart-mind-map/smart_mind_map.py b/plugins/actions/smart-mind-map/smart_mind_map.py index a12cb9f..dc1349c 100644 --- a/plugins/actions/smart-mind-map/smart_mind_map.py +++ b/plugins/actions/smart-mind-map/smart_mind_map.py @@ -4,7 +4,7 @@ author: Fu-Jie author_url: https://github.com/Fu-Jie/awesome-openwebui funding_url: https://github.com/open-webui funding_url: https://github.com/Fu-Jie/awesome-openwebui -version: 0.9.3 +version: 0.9.4 openwebui_id: 3094c59a-b4dd-4e0c-9449-15e2dd547dc4 icon_url: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjYiIGhlaWdodD0iNiIgcng9IjEiLz48cmVjdCB4PSIyIiB5PSIxNiIgd2lkdGg9IjYiIGhlaWdodD0iNiIgcng9IjEiLz48cmVjdCB4PSI5IiB5PSIyIiB3aWR0aD0iNiIgaGVpZ2h0PSI2IiByeD0iMSIvPjxwYXRoIGQ9Ik01IDE2di0zYTEgMSAwIDAgMSAxLTFoMTJhMSAxIDAgMCAxIDEgMXYzIi8+PHBhdGggZD0iTTEyIDEyVjgiLz48L3N2Zz4= description: Intelligently analyzes text content and generates interactive mind maps to help users structure and visualize knowledge. @@ -813,7 +813,7 @@ CONTENT_TEMPLATE_MINDMAP = """ SCRIPT_TEMPLATE_MINDMAP = """