Merge pull request #7857 from annando/improve-7854
Improvement for PR 7854: Avoid leaking of BCC header data
This commit is contained in:
commit
7fac116d5e
1 changed files with 9 additions and 13 deletions
|
@ -498,7 +498,13 @@ class Transmitter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['to' => array_values($data['to']), 'cc' => array_values($data['cc']), 'bcc' => array_values($data['bcc'])];
|
$receivers = ['to' => array_values($data['to']), 'cc' => array_values($data['cc']), 'bcc' => array_values($data['bcc'])];
|
||||||
|
|
||||||
|
if (!$blindcopy) {
|
||||||
|
unset($receivers['bcc']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $receivers;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -693,18 +699,6 @@ class Transmitter
|
||||||
$mail = self::ItemArrayFromMail($mail_id);
|
$mail = self::ItemArrayFromMail($mail_id);
|
||||||
$object = self::createNote($mail);
|
$object = self::createNote($mail);
|
||||||
|
|
||||||
if (!empty($object['cc'])) {
|
|
||||||
$object['to'] = array_merge($object['to'], $object['cc']);
|
|
||||||
unset($object['cc']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($object['bcc'])) {
|
|
||||||
$object['to'] = array_merge($object['to'], $object['bcc']);
|
|
||||||
unset($object['bcc']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$object['tag'] = [['type' => 'Mention', 'href' => $object['to'][0], 'name' => 'test']];
|
|
||||||
|
|
||||||
if (!$object_mode) {
|
if (!$object_mode) {
|
||||||
$data = ['@context' => ActivityPub::CONTEXT];
|
$data = ['@context' => ActivityPub::CONTEXT];
|
||||||
} else {
|
} else {
|
||||||
|
@ -730,6 +724,8 @@ class Transmitter
|
||||||
unset($data['bcc']);
|
unset($data['bcc']);
|
||||||
|
|
||||||
$object['to'] = $data['to'];
|
$object['to'] = $data['to'];
|
||||||
|
$object['tag'] = [['type' => 'Mention', 'href' => $object['to'][0], 'name' => '']];
|
||||||
|
|
||||||
unset($object['cc']);
|
unset($object['cc']);
|
||||||
unset($object['bcc']);
|
unset($object['bcc']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue