NormalizeMarkup scrub contentMap #932

Merged
Oneric merged 2 commits from Oneric/akkoma:normalize-markup_contentmap into develop 2025-06-07 18:27:27 +00:00
Owner

While contentMap values are currently unused, if this ever changes we first need to sanitise all existing entires in the database. Unsure whether we should do this sanitisation now, or only when/if those values actually start to get used (hoping we then didn’t forget about the lurking risk)

Fixes: #928

While `contentMap` values are currently unused, if this ever changes we first need to sanitise all existing entires in the database. Unsure whether we should do this sanitisation now, or only when/if those values actually start to get used (hoping we then didn’t forget about the lurking risk) Fixes: #928
Oneric added 2 commits 2025-05-16 23:52:18 +00:00
Only scrubbing "content" leads to differences between
"content" and "contentMap" eventhough the latter should
ideally match the former exactly for the primary language’s entry.

While ideally, for locally generated posts there should be no difference
between applying the scrubber or not, as it turns out automatically
generated attachment links didn't match the form expected by our default
scrubber.

Currently Akkoma never uses nor exposes the value of contentMap entries,
thus this oversight was harmless wrt to safety and at most pertubed
the language detection for our posts perfomed by remote servers.

Fixes: #928
common_api: make inserted attachment links scrubber-compliant
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
782a222efd
Author
Owner

Unsure whether we should do this sanitisation now, or only when/if those values actually start to get used (hoping we then didn’t forget about the lurking risk)

Since there might be more changes in the future; lets defer any retroactive processing for when we actually start to use the values

> Unsure whether we should do this sanitisation now, or only when/if those values actually start to get used (hoping we then didn’t forget about the lurking risk) Since there might be more changes in the future; lets defer any retroactive processing for when we actually start to use the values
Oneric merged commit d53a779c35 into develop 2025-06-07 18:27:27 +00:00
Oneric deleted branch normalize-markup_contentmap 2025-06-07 18:27:27 +00:00
Sign in to join this conversation.
No description provided.