Skip to content

[stable17] Fix push notifications for multibyte notifications - #577

Merged
rullzer merged 1 commit into
stable17from
backport/575/stable17
Mar 2, 2020
Merged

[stable17] Fix push notifications for multibyte notifications#577
rullzer merged 1 commit into
stable17from
backport/575/stable17

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 1bc59bc into stable17Mar 2, 2020
@rullzer
rullzer deleted the backport/575/stable17 branch March 2, 2020 09:53
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