Merge pull request #11185 from annando/issue-11182

Issue 10906: prevent personal notes from being altered
This commit is contained in:
Hypolite Petovan 2022-01-26 02:49:20 -05:00 committed by GitHub
commit 3395c61649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -391,6 +391,8 @@ function item_post(App $a) {
$only_to_forum = false;
$forum_contact = [];
// Personal notes must never be altered to a forum post.
if ($posttype != Item::PT_PERSONAL_NOTE) {
$body = BBCode::performWithEscapedTags($body, ['noparse', 'pre', 'code', 'img'], function ($body) use ($profile_uid, $network, $str_contact_allow, &$inform, &$private_forum, &$private_id, &$only_to_forum, &$forum_contact) {
$tags = BBCode::getTags($body);
@ -433,6 +435,7 @@ function item_post(App $a) {
return $body;
});
}
$original_contact_id = $contact_id;