nextcloud / groupfolders

๐Ÿ“๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Admin-configured folders shared by everyone in a group. https://github.com/nextcloud-releases/groupfolders
https://apps.nextcloud.com/apps/groupfolders
286 stars 87 forks source link

Trying to access array offset on value of type null at ACLManager.php#119 #2794

Closed ChristophWurst closed 2 days ago

ChristophWurst commented 9 months ago

How to use GitHub

Steps to reproduce

  1. ?

Expected behaviour

?

Actual behaviour

image

ErrorException: Warning: Trying to access array offset on value of type null
#19 /groupfolders/lib/ACL/ACLManager.php(119): OCA\GroupFolders\ACL\ACLManager::getRelevantPaths
#18 /groupfolders/lib/ACL/ACLManager.php(149): OCA\GroupFolders\ACL\ACLManager::getACLPermissionsForPath
#17 /groupfolders/lib/Trash/TrashBackend.php(264): OCA\GroupFolders\Trash\TrashBackend::userHasAccessToPath
#16 /groupfolders/lib/Trash/TrashBackend.php(332): OCA\GroupFolders\Trash\TrashBackend::getTrashForFolders
#15 /groupfolders/lib/Trash/TrashBackend.php(81): OCA\GroupFolders\Trash\TrashBackend::listTrashRoot
#14 /files_trashbin/lib/Trash/TrashManager.php(47): OCA\Files_Trashbin\Trash\TrashManager::OCA\Files_Trashbin\Trash\{closure}
#13 [internal](0): array_reduce
#12 /files_trashbin/lib/Trash/TrashManager.php(48): OCA\Files_Trashbin\Trash\TrashManager::listTrashRoot
#11 /files_trashbin/lib/Sabre/TrashRoot.php(75): OCA\Files_Trashbin\Sabre\TrashRoot::getChildren
#10 /files_trashbin/lib/Sabre/TrashRoot.php(88): OCA\Files_Trashbin\Sabre\TrashRoot::getChild
#9 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php(83): Sabre\DAV\Tree::getNodeForPath
#8 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php(184): Sabre\DAV\Tree::delete
#7 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(281): Sabre\DAV\CorePlugin::httpDelete
#6 /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\Server::emit
#5 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(472): Sabre\DAV\Server::invokeMethod
#4 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(253): Sabre\DAV\Server::start
#3 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(321): Sabre\DAV\Server::exec
#2 /dav/lib/Server.php(370): OCA\DAV\Server::exec
#1 /dav/appinfo/v2/remote.php(35): require_once
#0 /var/www/nextcloud/remote.php(172): null

Server configuration

Operating system:

Web server:

Database:

PHP version:

Nextcloud version: 28.0.2

Group folders version:

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from:

Are you using external storage, if yes which one: local/s3/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/...

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Insert your Nextcloud log here ```

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
ChristophWurst commented 9 months ago

As far as I can tell caused by https://github.com/nextcloud/groupfolders/pull/2754 so cc @come-nc.

come-nc commented 9 months ago

Hint: might be related to deleting from trash

ChristophWurst commented 9 months ago

$path is __groupfolders/trash so yes looks like that is the case

come-nc commented 9 months ago

Added a test to delete from trashbin and it works, @ChristophWurst Do you have steps to reproduce?

solracsf commented 3 months ago

Seing hundreds of these erros on v28.0.8 after upgrade from 27.0.11 (GF version 16.0.7).

{
  "reqId": "yBA1OqBrxZ9SIQy323Qv",
  "level": 3,
  "time": "2024-07-19T09:57:33+02:00",
  "remoteAddr": "37.28.52.27",
  "user": "cbarth",
  "app": "PHP",
  "method": "PROPFIND",
  "url": "/remote.php/dav/trashbin/cbarth/trash/",
  "message": "Trying to access array offset on value of type null at /var/www/nextcloud/apps/groupfolders/lib/ACL/ACLManager.php#120",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0",
  "version": "28.0.8.1",
  "data": {
    "app": "PHP"
  },
  "id": "669b951a3bb40"
}

image

solracsf commented 3 months ago

Maybe we could backport https://github.com/nextcloud/groupfolders/pull/2813 ?

come-nc commented 2 days ago

Maybe we could backport #2813 ?

It was backported, do you know if this bug can be closed? I never managed to reproduce myself.

solracsf commented 2 days ago

This is not logged anymore, hence closing.