SECURITY: XSS issue in share popup if invalid link is passed in.

This commit is contained in:
Guo Xiang Tan 2017-05-04 10:33:59 +08:00 committed by Robin Ward
parent d143cde643
commit 790acfd99f

View File

@ -39,7 +39,7 @@ export default Ember.Component.extend({
} else {
const $linkForTouch = $('#share-link .share-for-touch a');
$linkForTouch.attr('href', link);
$linkForTouch.html(link);
$linkForTouch.text(link);
const range = window.document.createRange();
range.selectNode($linkForTouch[0]);
window.getSelection().addRange(range);