yii2-comments icon indicating copy to clipboard operation
yii2-comments copied to clipboard

xss attacks has been executed

Open SerikK opened this issue 8 years ago • 1 comments

Hi! I have detected that there is xss attack not prevented. I guess because of these code ` $comments[$Comment->id] = $Comment->attributes;

$CommentListWidget ->getView() ->registerJs('jQuery("#' . $CommentListWidget->options['id'] . '").yiiCommentsList(' . Json::encode($comments) . ');');` As can be seen from these codes there seems to be no encoding of each attributes in Comment object.

SerikK avatar Sep 11 '16 20:09 SerikK

Hi. Thanks for issue. We need a unit test to fix the problem.

rmrevin avatar Sep 12 '16 11:09 rmrevin