MDL-64651 comments: Do not send referrer
Use blanktarget option on all comments to prevent malicious links.
This commit is contained in:
@@ -102,6 +102,7 @@ class core_comment_external extends external_api {
|
||||
if ($comments === false) {
|
||||
throw new moodle_exception('nopermissions', 'error', '', 'view comments');
|
||||
}
|
||||
$options = array('blanktarget' => true);
|
||||
|
||||
foreach ($comments as $key => $comment) {
|
||||
|
||||
@@ -110,7 +111,8 @@ class core_comment_external extends external_api {
|
||||
$context->id,
|
||||
$params['component'],
|
||||
'',
|
||||
0);
|
||||
0,
|
||||
$options);
|
||||
}
|
||||
|
||||
$results = array(
|
||||
|
||||
Reference in New Issue
Block a user