Skip to content

[stable18] Fix push notifications for multibyte notifications - #576

Merged
rullzer merged 1 commit into
stable18from
backport/575/stable18
Mar 2, 2020
Merged

[stable18] Fix push notifications for multibyte notifications#576
rullzer merged 1 commit into
stable18from
backport/575/stable18

Conversation

@backportbot-nextcloud

Copy link
Copy Markdown

backport of #575

json_encode is messing with multibyte characters a lot,
replacing them with something along "\u1234" instead of the assumed 2-times overhead.
The data length in our encryption is a hard limit, but we don't want to
make non-utf8 subjects unnecessary short. So this function tries to cut
it off first.
If that is not enough it always cuts off 5 characters in multibyte-safe
fashion until the json_encode-d string is shorter then the given limit.
Signed-off-by: Joas Schilling <coding@schilljs.com>
@rullzerrullzer mentioned this pull request Mar 2, 2020
@rullzer
rullzer merged commit b4d00ad into stable18Mar 2, 2020
@rullzer
rullzer deleted the backport/575/stable18 branch March 2, 2020 09:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@nickvergessen@rullzer