Skip to content
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

Numeric gid causes "Internal server error" when opening "User management" #194

Open
d-jsb opened this issue Jun 5, 2024 · 1 comment
Open

Comments

@d-jsb
Copy link

d-jsb commented Jun 5, 2024

Setup:
NC Version 28.0.6
user_sql 4.7.1 connecting to a yoomla DB - worked fine for some years now

Steps:
As (local) admin try to open user management with user_sql active and configured.
Result is a page telling about Internal server error -> user mgmt. not accessible

In the log:
OCA\UserSQL\Backend\GroupBackend::getGroupDetails(): Argument #1 ($gid) must be of type string, int given, called in /www/htdocs//lib/public/Group/Backend/ABackend.php on line 90 in file '/www/htdocs//apps/user_sql/lib/Backend/GroupBackend.php' line 428

Problem goes not occure if user_sql app is disable - obviously user login is now very difficult ;)
Fortunately user login does not seem to be affected

@d-jsb
Copy link
Author

d-jsb commented Jun 5, 2024

With log level debug I found:

/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.

Return type of OCA\UserSQL\Query\QueryProvider::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /www/htdocs//apps/user_sql/lib/Query/QueryProvider.php#269

Return type of OCA\UserSQL\Query\QueryProvider::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /www/htdocs//apps/user_sql/lib/Query/QueryProvider.php#261

Return type of OCA\UserSQL\Query\QueryProvider::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /www/htdocs//apps/user_sql/lib/Query/QueryProvider.php#249

Return type of OCA\UserSQL\Query\QueryProvider::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /www/htdocs//apps/user_sql/lib/Query/QueryProvider.php#241

Return type of OCA\UserSQL\Properties::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /www/htdocs//apps/user_sql/lib/Properties.php#258

Return type of OCA\UserSQL\Properties::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /www/htdocs//apps/user_sql/lib/Properties.php#226

Return type of OCA\UserSQL\Properties::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /www/htdocs//apps/user_sql/lib/Properties.php#214

Return type of OCA\UserSQL\Properties::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /www/htdocs//apps/user_sql/lib/Properties.php#206

kainhofer added a commit to kainhofer/user_sql that referenced this issue Jun 9, 2024
Until recently, numerid GIDs worked in NC, but now I get an error message that the GID needs to be a string rather than numeric => As a quick solution, simply cast the gid to CHAR in the sql query to ensure it is a string...

This fixes issue nextcloud#194 in nextcloud/user_sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant