π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-7888] fix(security): normalize href before protocol check in CustomLinkExtension (GHSA-v2vv-7wq3-8w2j) (#9313)
Manish Gupta73e360844bef
diff --git a/packages/editor/src/core/extensions/custom-link/extension.tsx b/packages/editor/src/core/extensions/custom-link/extension.tsxindex a00585b884..0b10226425 100644Binary files a/packages/editor/src/core/extensions/custom-link/extension.tsx and b/packages/editor/src/core/extensions/custom-link/extension.tsx differdiff --git a/packages/editor/src/core/extensions/custom-link/helpers/clickHandler.ts b/packages/editor/src/core/extensions/custom-link/helpers/clickHandler.tsindex f101f4c5bd..98c795cea3 100644--- a/packages/editor/src/core/extensions/custom-link/helpers/clickHandler.ts+++ b/packages/editor/src/core/extensions/custom-link/helpers/clickHandler.ts@@ -40,6 +40,16 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {const target = link?.target ?? attrs.target;if (link && href) {+ // Defence-in-depth: link.href is the browser-resolved URL (whitespace+ // already stripped by the browser's WHATWG URL parser), so a protocol+ // check here is sufficient to catch any dangerous URI that slipped past+ // the editor's parse/render-time guards. Matches the blocked-scheme list+ // in isValidHttpUrl (javascript:, data:, vbscript:, file:, about:)+ // to keep the policy consistent (GHSA-v2vv-7wq3-8w2j).+ if (/^(javascript|data|vbscript|file|about):/i.test(href)) {+ return false;+ }+window.open(href, target);return true;