Closed OliverWales closed 1 year ago
Description
<a /> tags pasted as HTML are not validated before they are turned into links in the Plate editor. This means that malicious links e.g. <a href="javascript: alert('Hello')>Click me</a> can be pasted and can execute arbitrary JS on click.
<a />
<a href="javascript: alert('Hello')>Click me</a>
Steps
Sandbox
Any, e.g. https://platejs.org
Expectation
Pasted links are validated according to the isUrl option provided to the plugin and paste as text if invalid.
isUrl
Closing as fixed by https://github.com/udecode/plate/pull/2240
Description
<a />
tags pasted as HTML are not validated before they are turned into links in the Plate editor. This means that malicious links e.g.<a href="javascript: alert('Hello')>Click me</a>
can be pasted and can execute arbitrary JS on click.Steps
Sandbox
Any, e.g. https://platejs.org
Expectation
Pasted links are validated according to the
isUrl
option provided to the plugin and paste as text if invalid.Funding