mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 05:23:48 +08:00
SECURITY: XSS issue in share popup if invalid link is passed in.
This commit is contained in:
parent
d143cde643
commit
790acfd99f
|
@ -39,7 +39,7 @@ export default Ember.Component.extend({
|
||||||
} else {
|
} else {
|
||||||
const $linkForTouch = $('#share-link .share-for-touch a');
|
const $linkForTouch = $('#share-link .share-for-touch a');
|
||||||
$linkForTouch.attr('href', link);
|
$linkForTouch.attr('href', link);
|
||||||
$linkForTouch.html(link);
|
$linkForTouch.text(link);
|
||||||
const range = window.document.createRange();
|
const range = window.document.createRange();
|
||||||
range.selectNode($linkForTouch[0]);
|
range.selectNode($linkForTouch[0]);
|
||||||
window.getSelection().addRange(range);
|
window.getSelection().addRange(range);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user