Skip to content

Conversation

@natoponen
Copy link
Contributor

@natoponen natoponen commented Nov 8, 2022

There is an issue(bug) when using UTF-8 symbols in any method, which checks the length of string as isset($id[64]) in Notification.php.

You can set only 32 UTF-8 symbols because they are 2 byte, and this "array" check seems inapropriate in this case, as it throws unexpected exceptions for strings with length less than 64 symbols (in UTF-8).

Close #35016

There is an issue(bug) when using UTF-8 symbols in any method, which checks the length of string as `isset($id[64])`. You can set only 32 UTF-8 symbols because they are 2 byte, and this "array" check seems inapropriate in this case, as it throws unexpected exceptions.

Signed-off-by: natoponen <[email protected]>
@szaimen szaimen added bug 3. to review Waiting for reviews labels Nov 8, 2022
@szaimen szaimen added this to the Nextcloud 26 milestone Nov 8, 2022
@szaimen szaimen requested review from a team, ArtificialOwl, icewind1991 and skjnldsv and removed request for a team November 8, 2022 08:48
@szaimen szaimen merged commit 10aa382 into nextcloud:master Nov 11, 2022
@welcome
Copy link

welcome bot commented Nov 11, 2022

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable25

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable24

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable23

@backportbot-nextcloud
Copy link

The backport to stable24 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable23 failed. Please do this backport manually.

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable24

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable25

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable23

@backportbot-nextcloud
Copy link

The backport to stable24 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable23 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable25

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable24

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable23

@backportbot-nextcloud
Copy link

The backport to stable23 failed. Please do this backport manually.

@szaimen
Copy link
Contributor

szaimen commented Nov 11, 2022

/backport to stable23

@nickvergessen
Copy link
Member

This breaks on MySQL without utf8mb4 support.
It is also not intended/needed to have non asci characters as object types and ids.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Unexpected exceptions for messages in Notification.php

5 participants