Open loulous24 opened 4 months ago
TBH, i don't think that's an actually supported use case. Nextcloud won't let me create any users with UTF-8 characters and neither will openldap. So i have no way of reproducing the issue and testing any fixes.
My guess is that the browser function btoa (which does not support UTF-8) mangles the name when creating the authentication header for the API.
I have added a workaround for this, which should result in an UTF-8 encoded name being sent. It looks like the data is correct, but you will have to check with the 2024.6.20 nightly to see if it actually solves the issue.
Hello, Thank you for your quick answer. For tests purposes, I replicated a mock of our infrastructure with nextcloud running in a docker and ldap running in another one. I was able to replicate the bug with a user with a UTF-8 character in its name. Without any problem, I was able to create in openldap a user with UTF-8 character in its uid.
It is right that the frontend of Nextcloud do not allow to have a username with an UTF-8 character (I did not try to force it). For users imported from ldap, the internal username used by Nextcloud is an UUID (according to here) but the log in is made with the LDAP uid which can contain UTF-8 characters.
I did the upgrade to the Passwords app with the nightly version found here.
It seemed that your workaround worked well. We will put it in production when the next stable version will be released.
Thank you for your quick answer and your fix !
⚠️ This issue respects the following points: ⚠️
Server Information
Client Information
Browser and Version: Chrome 125 Client OS and Version: Windows 10
Bug description
When connecting to the password application with a user that has a special character inside their username, a 500 - Server error occurs.
The problem is related to the LDAP. In the two logs provided below, one request is done with the right filter for the uid of the user (uid=C\u00e9line) and the user is "Céline" but the other request to the LDAP is done with a wrong filter (uid=C?line) and so the user is not found.
This problem only applies to the Passwords app, no other weird behaviour happens to this user on our Nextcloud.
Steps to reproduce
Expected behavior
Nextcloud Logs
Browser Logs
No response