Loosen the validation regex of emoji reaction a bit
ci/woodpecker/pr/woodpecker Pipeline is pending Details

We couldn't previously react with an emoji whose shortcode contained
dots, spaces or any non-ascii characters.

The only rule we're now enforcing is that it might contain only one `@`
character (used to distinguish external emoji) and must be wrapped with
colon symbols.
This commit is contained in:
fruye 2023-02-15 20:12:01 +01:00
parent b71db2f82d
commit 33daaac84c
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.EmojiReactValidator do
import Pleroma.Web.ActivityPub.ObjectValidators.CommonValidations
@primary_key false
@emoji_regex ~r/:[A-Za-z0-9_-]+(@.+)?:/
@emoji_regex ~r/^:[^@]+(@[^@]+)?:$/
embedded_schema do
quote do