summaryrefslogtreecommitdiff
path: root/test/fixtures
diff options
context:
space:
mode:
authorHélène <pleroma-dev@helene.moe>2022-07-24 13:31:35 +0200
committerHélène <pleroma-dev@helene.moe>2022-07-24 13:36:06 +0200
commit388bbc4978a97eb82554c6d8ebc8bb6c9d429080 (patch)
tree88b601406c4b0d4ecedd077674a803549546c8db /test/fixtures
parent301ce5bc627d91b21c33af73eeb266025cd14728 (diff)
downloadpleroma-388bbc4978a97eb82554c6d8ebc8bb6c9d429080.tar.gz
pleroma-388bbc4978a97eb82554c6d8ebc8bb6c9d429080.zip
EmojiReactValidator: fix emoji qualification
Tries fully-qualifying emoji when receiving them, by adding the emoji variation sequence to the received reaction emoji. This issue arises when other instance software, such as Misskey, tries reacting with emoji that have unqualified or minimally qualified variants, like a red heart. Pleroma only accepts fully qualified emoji in emoji reactions, and refused those emoji. Now, Pleroma will attempt to properly qualify them first, and reject them if checks still fail. This commit contains changes to tests proposed by lanodan. Co-authored-by: Haelwenn <contact+git.pleroma.social@hacktivis.me>
Diffstat (limited to 'test/fixtures')
-rw-r--r--test/fixtures/emoji-reaction-unqualified.json30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/fixtures/emoji-reaction-unqualified.json b/test/fixtures/emoji-reaction-unqualified.json
new file mode 100644
index 000000000..722fd7092
--- /dev/null
+++ b/test/fixtures/emoji-reaction-unqualified.json
@@ -0,0 +1,30 @@
+{
+ "type": "EmojiReact",
+ "signature": {
+ "type": "RsaSignature2017",
+ "signatureValue": "fdxMfQSMwbC6wP6sh6neS/vM5879K67yQkHTbiT5Npr5wAac0y6+o3Ij+41tN3rL6wfuGTosSBTHOtta6R4GCOOhCaCSLMZKypnp1VltCzLDoyrZELnYQIC8gpUXVmIycZbREk22qWUe/w7DAFaKK4UscBlHDzeDVcA0K3Se5Sluqi9/Zh+ldAnEzj/rSEPDjrtvf5wGNf3fHxbKSRKFt90JvKK6hS+vxKUhlRFDf6/SMETw+EhwJSNW4d10yMUakqUWsFv4Acq5LW7l+HpYMvlYY1FZhNde1+uonnCyuQDyvzkff8zwtEJmAXC4RivO/VVLa17SmqheJZfI8oluVg==",
+ "creator": "http://mastodon.example.org/users/admin#main-key",
+ "created": "2018-02-17T18:57:49Z"
+ },
+ "object": "http://localtesting.pleroma.lol/objects/eb92579d-3417-42a8-8652-2492c2d4f454",
+ "content": "❤",
+ "nickname": "lain",
+ "id": "http://mastodon.example.org/users/admin#reactions/2",
+ "actor": "http://mastodon.example.org/users/admin",
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ "https://w3id.org/security/v1",
+ {
+ "toot": "http://joinmastodon.org/ns#",
+ "sensitive": "as:sensitive",
+ "ostatus": "http://ostatus.org#",
+ "movedTo": "as:movedTo",
+ "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
+ "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
+ "conversation": "ostatus:conversation",
+ "atomUri": "ostatus:atomUri",
+ "Hashtag": "as:Hashtag",
+ "Emoji": "toot:Emoji"
+ }
+ ]
+}