fix(SessionService): sanitize displayName to utf8 encoding#8405
fix(SessionService): sanitize displayName to utf8 encoding#8405silverkszlo wants to merge 1 commit intostable32from
Conversation
Signed-off-by: silver <s.szmajduch@posteo.de>
46c903a to
6b33c6e
Compare
mejo-
left a comment
There was a problem hiding this comment.
Interesting corner case and I wonder whether this would need to be applied in other places as well. Searching for [dD]isplayName revealed at least lib/Notification/Notifier.php and lib/Controller/UserApiController.php.
But fine with merging as is. A comment in the code would be nice to make it clear for the future why we do the extra sanitizing there.
|
Ahh, I just now realized that this is supposed to be merged to |
No good reason, I just started developing in 32 as the user reported their issue in that version and then I have just noticed, after creating the PR, that it would have made more sense to apply that in main directly. I'll add the change to the other branches soon. |
📝 Summary
A user reported that they can not open text/md files and were getting the following error message: "Malformed UTF-8 characters, possibly incorrectly encoded", while most other users could open the same file without a problem.
This PR uses
EncodingServiceto convert display names from external backends (e.g. LDAP/AD) to UTF-8 before including them in JSON responses.🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)