Appropriate length check in Notification.php#35015
Conversation
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 <57988162+natoponen@users.noreply.github.com>
|
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 |
|
/backport to stable25 |
|
/backport to stable24 |
|
/backport to stable23 |
|
The backport to stable24 failed. Please do this backport manually. |
|
The backport to stable25 failed. Please do this backport manually. |
|
The backport to stable23 failed. Please do this backport manually. |
|
/backport to stable24 |
|
/backport to stable25 |
|
/backport to stable23 |
|
The backport to stable24 failed. Please do this backport manually. |
|
The backport to stable23 failed. Please do this backport manually. |
|
The backport to stable25 failed. Please do this backport manually. |
|
/backport to stable25 |
|
/backport to stable24 |
|
/backport to stable23 |
|
The backport to stable23 failed. Please do this backport manually. |
|
/backport to stable23 |
|
This breaks on MySQL without utf8mb4 support. |
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