{
"reqId": "JFpxYBVNyfQoj4iQgJXj",
"level": 4,
"time": "2021-01-09T10:59:08+00:00",
"remoteAddr": "xxx.xxx.xxx.xxx",
"user": "User1",
"app": "webdav",
"method": "DELETE",
"url": "/remote.php/dav/files/User1/MyShare88",
"message": {
"Exception": "TypeError",
"Message": "Argument 2 passed to OCA\\User_LDAP\\Access::searchUsers() must be of the type array or null, string given, called in /var/www/nextcloud/apps/user_ldap/lib/Group_LDAP.php on line 214",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/user_ldap/lib/Group_LDAP.php",
"line": 214,
"function": "searchUsers",
"class": "OCA\\User_LDAP\\Access",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/user_ldap/lib/Group_LDAP.php",
"line": 291,
"function": "getDynamicGroupMembers",
"class": "OCA\\User_LDAP\\Group_LDAP",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/user_ldap/lib/Group_LDAP.php",
"line": 899,
"function": "_groupMembers",
"class": "OCA\\User_LDAP\\Group_LDAP",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/user_ldap/lib/Group_Proxy.php",
"line": 157,
"function": "usersInGroup",
"class": "OCA\\User_LDAP\\Group_LDAP",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Group/Group.php",
"line": 134,
"function": "usersInGroup",
"class": "OCA\\User_LDAP\\Group_Proxy",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Share20/DefaultShareProvider.php",
"line": 1316,
"function": "getUsers",
"class": "OC\\Group\\Group",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Share20/Manager.php",
"line": 1671,
"function": "getAccessList",
"class": "OC\\Share20\\DefaultShareProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Share20/ShareHelper.php",
"line": 53,
"function": "getAccessList",
"class": "OC\\Share20\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/activity/lib/FilesHooks.php",
"line": 635,
"function": "getPathsForAccessList",
"class": "OC\\Share20\\ShareHelper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/activity/lib/FilesHooks.php",
"line": 225,
"function": "getUserPathsFromPath",
"class": "OCA\\Activity\\FilesHooks",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/activity/lib/FilesHooks.php",
"line": 177,
"function": "addNotificationsForFileAction",
"class": "OCA\\Activity\\FilesHooks",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/activity/lib/FilesHooksStatic.php",
"line": 63,
"function": "fileDelete",
"class": "OCA\\Activity\\FilesHooks",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/legacy/OC_Hook.php",
"line": 110,
"function": "fileDelete",
"class": "OCA\\Activity\\FilesHooksStatic",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 1280,
"function": "emit",
"class": "OC_Hook",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 1150,
"function": "runHooks",
"class": "OC\\Files\\View",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 350,
"function": "basicOperation",
"class": "OC\\Files\\View",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php",
"line": 309,
"function": "rmdir",
"class": "OC\\Files\\View",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 183,
"function": "delete",
"class": "OCA\\DAV\\Connector\\Sabre\\Directory",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 295,
"function": "delete",
"class": "Sabre\\DAV\\Tree",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpDelete",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 474,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 251,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 319,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Server.php",
"line": 332,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->"
},
{
"file": "/var/www/nextcloud/remote.php",
"line": 167,
"args": [
"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/apps/user_ldap/lib/Access.php",
"Line": 988,
"CustomMessage": "--"
},
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0",
"version": "20.0.4.0"
}
How to use GitHub
Steps to reproduce
Expected behaviour
Shared folder should be deleted
Actual behaviour
The user get an error in the gui that the folder could not be deleted
In the nextcloud.log there is this error:
"Argument 2 passed to OCA\User_LDAP\Access::searchUsers() must be of the type array or null, string given, called in /var/www/nextcloud/apps/user_ldap/lib/Group_LDAP.php on line 214"
(for the full error message have a look at the "Nextcloud Log" section below)
The problem I found in line 214 is that the second Argument "dn" (DN of the LDAP Object) for the function searchUsers() is a string instead of an array:
$foundMembers = $this->access->searchUsers($memberUrlFilter, 'dn');
If I change the code in Group_LDAP.php to:
+$distname=array("dn");
-$foundMembers = $this->access->searchUsers($memberUrlFilter, 'dn');
+$foundMembers = $this->access->searchUsers($memberUrlFilter, $distname);
the Groupmembers are found and the shared folder can be deleted
The same happens if I try to remove a user from a share.
Server configuration
Operating system: Ubuntu 20.04
Web server: Apache 2.4.41
Database: MariaDB 10.4
PHP version: 7.4
Nextcloud version: 20.0.4
Updated from an older Nextcloud/ownCloud or fresh install: Updated from 16 to 17 to 18 to 19 to 20
Where did you install Nextcloud from:
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP
LDAP configuration (delete this part if not used)
LDAP config
Client configuration
Browser:
Operating system:
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
Browser log
Browser log