-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: LDAP usernames full-numeric (1234) gives Exception : Trying to access array|string on value of type int #35642
Comments
Mind to push a PR? |
apologies, yes! |
Signed-off-by: Alexie Papanicolaou <[email protected]>
I cannot reproduce the problem:
|
@alpapan Do you have steps to reproduce this on 28 or master? Even when a field has a value like "12341234" it should be typed as a string in PHP and make no difference. |
I have no local patches i know off To attempt to reproduce I'd have to reinstall the server and set it up again, about an hour's work. |
Bug description
NOTE: The following bug report uses the files:scan CMD to show the problem.
However, this bug affects the WEB version as well, making nextcloud inoperable if you have
This bug report identifies the function that causes the problem and offers a solution.
/NOTE
LDAP used to work fine but now I updated from 21 to 25 and:
sudo -u www-data php /var/www/nextcloud/occ files:scan gives the following error for users registered on LDAP.
I dumped the variable and it turns out the cause is because the user ID is numeric and is treated as an int instead of string:
The code Group_LDAP.php checks array[0] if it is_string which returns FALSE for integers.
The following patch will fix it by checking if the $item is an array instead of a string
Steps to reproduce
Expected behavior
Before the patch I expected the following:
but it produced the above error. By applying the above patch, the expected behaviour is correct.
Installation method
Community Manual installation with Archive
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
available if you really need them
Additional info
No response
The text was updated successfully, but these errors were encountered: