Steps to reproduce
On one of my two OwnCloud 9.x systems, OwnCloud Crashes with a PHP Exception when a User is Authenticated.
Expected behaviour
LDAP users should be authenticated.
Actual behaviour
{“reqId”:“WxZMVvPN8MMZFK2OLh3zqAAAAAg”,“remoteAddr”:“192.168.0.4”,“app”:“index”,“message”:“Exception: {“Exception”:“InvalidArgumentException”,“Message”:”",“Code”:0,“Trace”:"#0 \/usr\/share\/owncloud\/lib\/private\/Share20\/DefaultShareProvider.php(791): OC\\Share20\\Share->setSharedBy(NULL)\n#1 \/usr\/share\/owncloud\/lib\/private\/Share20\/DefaultShareProvider.php(648): OC\\Share20\\DefaultShareProvider->createShare(Array)\n#2 \/usr\/share\/owncloud\/lib\/private\/Share20\/Manager.php(960): OC\\Share20\\DefaultShareProvider->getSharedWith(‘4054b596-267c-1…’, 0, NULL, -1, 0)\n#3 \/usr\/share\/owncloud\/apps\/files_sharing\/lib\/MountProvider.php(69): OC\\Share20\\Manager->getSharedWith(‘4054b596-267c-1…’, 0, NULL, -1)\n#4 \/usr\/share\/owncloud\/lib\/private\/Files\/Config\/MountProviderCollection.php(76): OCA\\Files_Sharing\\MountProvider->getMountsForUser(Object(OC\\User\\User), Object(OC\\Files\\Storage\\StorageFactory))\n#5 [internal function]: OC\\Files\\Config\\MountProviderCollection->OC\\Files\\Config\\{closure}(Object(OCA\\Files_Sharing\\MountProvider))\n#6 \/usr\/share\/owncloud\/lib\/private\/Files\/Config\/MountProviderCollection.php(77): array_map(Object(Closure), Array)\n#7 \/usr\/share\/owncloud\/lib\/private\/Files\/Filesystem.php(443): OC\\Files\\Config\\MountProviderCollection->getMountsForUser(Object(OC\\User\\User))\n#8 \/usr\/share\/owncloud\/lib\/private\/Files\/Filesystem.php(373): OC\\Files\\Filesystem::initMountPoints(‘4054b596-267c-1…’)\n#9 \/usr\/share\/owncloud\/lib\/private\/legacy\/util.php(231): OC\\Files\\Filesystem::init(‘4054b596-267c-1…’, ‘\/4054b596-267c-…’)\n#10 \/usr\/share\/owncloud\/lib\/base.php(890): OC_Util::setupFS()\n#11 \/usr\/share\/owncloud\/index.php(54): OC::handleRequest()\n#12 {main}",“File”:"\/usr\/share\/owncloud\/lib\/private\/Share20\/Share.php",“Line”:287}",“level”:3,“time”:“2018-06-05T08:39:51+00:00”,“method”:“GET”,“url”:"/owncloud/index.php/apps/files/",“user”:“4054b596-267c-102c-918a-d9d787c9dc10”}
{“reqId”:“WxZMXD7ht@w2nimqTfgyugAAAAE”,“remoteAddr”:“192.168.0.4”,“app”:“index”,“message”:“Exception: {“Exception”:“InvalidArgumentException”,“Message”:”",“Code”:0,“Trace”:"#0 \/usr\/share\/owncloud\/lib\/private\/Share20\/DefaultShareProvider.php(791): OC\\Share20\\Share->setSharedBy(NULL)\n#1 \/usr\/share\/owncloud\/lib\/private\/Share20\/DefaultShareProvider.php(648): OC\\Share20\\DefaultShareProvider->createShare(Array)\n#2 \/usr\/share\/owncloud\/lib\/private\/Share20\/Manager.php(960): OC\\Share20\\DefaultShareProvider->getSharedWith(‘4054b596-267c-1…’, 0, NULL, -1, 0)\n#3 \/usr\/share\/owncloud\/apps\/files_sharing\/lib\/MountProvider.php(69): OC\\Share20\\Manager->getSharedWith(‘4054b596-267c-1…’, 0, NULL, -1)\n#4 \/usr\/share\/owncloud\/lib\/private\/Files\/Config\/MountProviderCollection.php(76): OCA\\Files_Sharing\\MountProvider->getMountsForUser(Object(OC\\User\\User), Object(OC\\Files\\Storage\\StorageFactory))\n#5 [internal function]: OC\\Files\\Config\\MountProviderCollection->OC\\Files\\Config\\{closure}(Object(OCA\\Files_Sharing\\MountProvider))\n#6 \/usr\/share\/owncloud\/lib\/private\/Files\/Config\/MountProviderCollection.php(77): array_map(Object(Closure), Array)\n#7 \/usr\/share\/owncloud\/lib\/private\/Files\/Filesystem.php(443): OC\\Files\\Config\\MountProviderCollection->getMountsForUser(Object(OC\\User\\User))\n#8 \/usr\/share\/owncloud\/lib\/private\/Files\/Filesystem.php(373): OC\\Files\\Filesystem::initMountPoints(‘4054b596-267c-1…’)\n#9 \/usr\/share\/owncloud\/lib\/private\/legacy\/util.php(231): OC\\Files\\Filesystem::init(‘4054b596-267c-1…’, ‘\/4054b596-267c-…’)\n#10 \/usr\/share\/owncloud\/lib\/base.php(890): OC_Util::setupFS()\n#11 \/usr\/share\/owncloud\/index.php(54): OC::handleRequest()\n#12 {main}",“File”:"\/usr\/share\/owncloud\/lib\/private\/Share20\/Share.php",“Line”:287}",“level”:3,“time”:“2018-06-05T08:39:57+00:00”,“method”:“GET”,“url”:"/owncloud/index.php/apps/gallery/config?extramediatypes=1",“user”:“4054b596-267c-102c-918a-d9d787c9dc10”}
{“reqId”:“WxZMXFW3W-zbbMtUTsjfZQAAAAc”,“remoteAddr”:“192.168.0.4”,“app”:“PHP”,“message”:“InvalidArgumentException: at /usr/share/owncloud/lib/private/Share20/Share.php#287”,“level”:3,“time”:“2018-06-05T08:39:57+00:00”,“method”:“GET”,“url”:"/owncloud/ocs/v2.php/apps/notifications/api/v1/notifications?format=json",“user”:“4054b596-267c-102c-918a-d9d787c9dc10”}
Server configuration
Operating system:
Mageia Linux 6
Web server:
Apache
Database:
MariaDB
PHP version:
5.6.36
ownCloud version: (see ownCloud admin page)
9.1.8
Updated from an older ownCloud or fresh install:
Updated from 9.0.11
Where did you install ownCloud from:
OS RPM Package. However, only this one node failed the upgrade.
Signing status (ownCloud 9.0 and above):
Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed
paste the results into https://gist.github.com/ and puth the link here.
The content of config/config.php:
Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.
or
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder
*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.
List of activated apps:
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.
Are you using external storage, if yes which one: local/smb/sftp/…
Are you using encryption: yes/no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
LDAP configuration (delete this part if not used)
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder
Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';
Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
Client configuration
Browser:
Operating system:
Logs
Web server error log
Insert your webserver log here
ownCloud log (data/owncloud.log)
Insert your ownCloud log here
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...