Closed sirdrakeistda closed 1 year ago
Can you share the full log line from nextcloud.log file?
{"reqId":"Y94vVY3cKuFfoOaEjgna9QAAAJI","level":3,"time":"2023-02-04T10:11:33+00:00","remoteAddr":"167.74.9.157","user":"user","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/user/Software+Betriebsysteme/VirtualBox%20VM","message":"Bit shift by negative number","userAgent":"Mozilla/5.0 (Linux) mirall/3.6.6-20230120.115834.ff2293824-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-58-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.3.2","exception":{"Exception":"ArithmeticError","Message":"Bit shift by negative number","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/terms_of_service/lib/Checker.php","line":157,"function":"matchCidr","class":"OCA\\TermsOfService\\Checker","type":"->"},{"file":"/var/www/nextcloud/apps/terms_of_service/lib/Checker.php","line":140,"function":"isWOPIRemoteAddress","class":"OCA\\TermsOfService\\Checker","type":"->"},{"file":"/var/www/nextcloud/apps/terms_of_service/lib/Checker.php","line":98,"function":"isValidWOPIRequest","class":"OCA\\TermsOfService\\Checker","type":"->"},{"file":"/var/www/nextcloud/apps/terms_of_service/lib/Filesystem/Helper.php","line":116,"function":"currentUserHasSigned","class":"OCA\\TermsOfService\\Checker","type":"->"},{"file":"/var/www/nextcloud/apps/terms_of_service/lib/Filesystem/CacheWrapper.php","line":43,"function":"verifyAccess","class":"OCA\\TermsOfService\\Filesystem\\Helper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php","line":78,"function":"formatCacheEntry","class":"OCA\\TermsOfService\\Filesystem\\CacheWrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1343,"function":"get","class":"OC\\Files\\Cache\\Wrapper\\CacheWrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1394,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":218,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":78,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":73,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":971,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":360,"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":171,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/terms_of_service/lib/Checker.php","Line":178,"message":"Bit shift by negative number","exception":[],"CustomMessage":"Bit shift by negative number"},"id":"63de55ce0a3db"}
Can you also share the wopi allow list? Either from occ:
sudo -u www-data php occ config:app:get richdocuments wopi_allowlist
or by generating a config report in the support app
Allow list wopi requests:
local ip adress, 127.0.0.1, nextcloud.server.url, 127.0.0.1/9980
I guess the /9980
is the problem. the allowlist is not supposed to contain subpaths (neither port if that was the intention)
Thanks, that fixed the issue for me.
Will keep it open to save guard the code against bad entries
Nextcloud file is ot usable due to this error. Deactivating terms of services fixes the error, so its caused by this app. Setup: Nextcloud 25.0.3 Terms of Services: 2.0.1
Error log: