-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmap31-feedbackbug
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
- The default value for the
indexedfield inpreferencestable is set to''in$table->addColumn('indexed', Types::STRING, ['notnull' => false, 'default' => '', 'length' => 64]); - This means if you have
configvalueentries like''you will always get wrong results as the query inchecks forserver/lib/private/Config/UserConfig.php
Line 516 in b33fdaf
$qb->expr()->eq($qb->func()->lower($configValueColumn), $qb->createNamedParameter(strtolower($value))) indexed = ''on top of checking forconfigvaluefield - The workaround for this would be to set the flag value to avoid indexed queries for all these rows
- But shouldn't there be a more sensible
NULLdefault instead?
Steps to reproduce
- Set a preference using
occ user:setting username1 some-app some-key '' - Set a preference using
occ user:setting username2 some-app some-key some-value - Use
IUserConfig::searchUsersByValueString('some-app', 'some-key', ''); - It will return both results
Expected behavior
- The method should return only one result
- The sensible default for the
indexedfield should beNULLas it is a NULLABLE field
Nextcloud Server version
31
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmap31-feedbackbug