nextcloud / files_lock

GNU Affero General Public License v3.0
25 stars 8 forks source link

Public shares broken #11

Closed juliusknorr closed 4 years ago

juliusknorr commented 4 years ago

This exception happens when a file is accessed (downloaded) though a public share link

{"reqId":"tNb1C9ubD8Oy3MaKekJA","level":3,"time":"2019-11-27T20:49:24+00:00","remoteAddr":"192.168.21.7","user":"--","app":"index","method":"GET","url":"/index.php/s/yMFdXZNjqbsfJaf/download","message":{"Exception":"Exception","Message":"Call to a member function getUID() on null","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":123,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files_Sharing\\Controller\\ShareController"},"downloadShare"]},{"file":"/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Files_Sharing\\Controller\\ShareController","downloadShare",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"token":"yMFdXZNjqbsfJaf","_route":"files_sharing.sharecontroller.downloadShare"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"token":"yMFdXZNjqbsfJaf","_route":"files_sharing.sharecontroller.downloadShare"}]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"token":"yMFdXZNjqbsfJaf","_route":"files_sharing.sharecontroller.downloadShare"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/s/yMFdXZNjqbsfJaf/download"]},{"file":"/var/www/html/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":107,"Previous":{"Exception":"Error","Message":"Call to a member function getUID() on null","Code":0,"Trace":[{"file":"/var/www/html/apps-extra/files_lock/lib/Service/LockService.php","line":251,"function":"getFileFromPath","class":"OCA\\FilesLock\\Service\\FileService","type":"->","args":["/eenetdb.odt"]},{"file":"/var/www/html/apps-extra/files_lock/lib/Storage/LockWrapper.php","line":81,"function":"isPathLocked","class":"OCA\\FilesLock\\Service\\LockService","type":"->","args":["files/eenetdb.odt",""]},{"file":"/var/www/html/apps-extra/files_lock/lib/Storage/LockWrapper.php","line":53,"function":"isLocked","class":"OCA\\FilesLock\\Storage\\LockWrapper","type":"->","args":["files/eenetdb.odt"]},{"file":"/var/www/html/apps-extra/files_lock/lib/Storage/LockWrapper.php","line":158,"function":"checkPermissions","class":"OCA\\FilesLock\\Storage\\LockWrapper","type":"->","args":["files/eenetdb.odt",1]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OCA\\FilesLock\\Storage\\LockWrapper","type":"->","args":["files/eenetdb.odt","r"]},{"file":"/var/www/html/lib/private/Files/View.php","line":1157,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/eenetdb.odt","r"]},{"file":"/var/www/html/lib/private/Files/View.php","line":993,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["fopen","/eenetdb.odt",["read"],"r"]},{"file":"/var/www/html/lib/private/Files/View.php","line":423,"function":"fopen","class":"OC\\Files\\View","type":"->","args":["//eenetdb.odt","r"]},{"file":"/var/www/html/lib/private/legacy/files.php","line":341,"function":"readfile","class":"OC\\Files\\View","type":"->","args":["//eenetdb.odt"]},{"file":"/var/www/html/lib/private/legacy/files.php","line":125,"function":"getSingleFile","class":"OC_Files","type":"::","args":[{"__class__":"OC\\Files\\View"},"/","eenetdb.odt",{"head":false}]},{"file":"/var/www/html/apps/files_sharing/lib/Controller/ShareController.php","line":606,"function":"get","class":"OC_Files","type":"::","args":["/","eenetdb.odt",{"head":false}]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":168,"function":"downloadShare","class":"OCA\\Files_Sharing\\Controller\\ShareController","type":"->","args":["yMFdXZNjqbsfJaf",null,"",""]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":97,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files_Sharing\\Controller\\ShareController"},"downloadShare"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":123,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files_Sharing\\Controller\\ShareController"},"downloadShare"]},{"file":"/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Files_Sharing\\Controller\\ShareController","downloadShare",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"token":"yMFdXZNjqbsfJaf","_route":"files_sharing.sharecontroller.downloadShare"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"token":"yMFdXZNjqbsfJaf","_route":"files_sharing.sharecontroller.downloadShare"}]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"token":"yMFdXZNjqbsfJaf","_route":"files_sharing.sharecontroller.downloadShare"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/s/yMFdXZNjqbsfJaf/download"]},{"file":"/var/www/html/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/apps-extra/files_lock/lib/Service/FileService.php","Line":99},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36","version":"18.0.0.2"}
juliusknorr commented 4 years ago

Similar one for editing in Collabora (which is acually an unauthenticated request where no current user is available)

{"reqId":"zX4M2FYrN5fKGYCn0Xue","level":3,"time":"2019-11-27T20:49:17+00:00","remoteAddr":"192.168.21.7","user":"--","app":"index","method":"GET","url":"/index.php/apps/richdocuments/wopi/files/3243_ocytbc05yupz/contents?access_token=KIahAIQ6gmkvPMvrJZsy1E8mQIP5DroK&access_token_ttl=0","message":{"Exception":"Exception","Message":"Call to a member function getUID() on null","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":123,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\WopiController"},"getFile"]},{"file":"/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Richdocuments\\Controller\\WopiController","getFile",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"fileId":"3243_ocytbc05yupz","_route":"richdocuments.wopi.getFile"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"fileId":"3243_ocytbc05yupz","_route":"richdocuments.wopi.getFile"}]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"fileId":"3243_ocytbc05yupz","_route":"richdocuments.wopi.getFile"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/wopi/files/3243_ocytbc05yupz/contents"]},{"file":"/var/www/html/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":107,"Previous":{"Exception":"Error","Message":"Call to a member function getUID() on null","Code":0,"Trace":[{"file":"/var/www/html/apps-extra/files_lock/lib/Service/LockService.php","line":251,"function":"getFileFromPath","class":"OCA\\FilesLock\\Service\\FileService","type":"->","args":["/eenetdb.odt"]},{"file":"/var/www/html/apps-extra/files_lock/lib/Storage/LockWrapper.php","line":81,"function":"isPathLocked","class":"OCA\\FilesLock\\Service\\LockService","type":"->","args":["files/eenetdb.odt",""]},{"file":"/var/www/html/apps-extra/files_lock/lib/Storage/LockWrapper.php","line":53,"function":"isLocked","class":"OCA\\FilesLock\\Storage\\LockWrapper","type":"->","args":["files/eenetdb.odt"]},{"file":"/var/www/html/apps-extra/files_lock/lib/Storage/LockWrapper.php","line":158,"function":"checkPermissions","class":"OCA\\FilesLock\\Storage\\LockWrapper","type":"->","args":["files/eenetdb.odt",1]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OCA\\FilesLock\\Storage\\LockWrapper","type":"->","args":["files/eenetdb.odt","r"]},{"file":"/var/www/html/lib/private/Files/View.php","line":1157,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/eenetdb.odt","r"]},{"file":"/var/www/html/lib/private/Files/View.php","line":993,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["fopen","/admin/files/eenetdb.odt",["read"],"r"]},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":108,"function":"fopen","class":"OC\\Files\\View","type":"->","args":["/admin/files/eenetdb.odt","r"]},{"file":"/var/www/html/apps-extra/richdocuments/lib/Controller/WopiController.php","line":352,"function":"fopen","class":"OC\\Files\\Node\\File","type":"->","args":["rb"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":168,"function":"getFile","class":"OCA\\Richdocuments\\Controller\\WopiController","type":"->","args":["3243","KIahAIQ6gmkvPMvrJZsy1E8mQIP5DroK"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":97,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\WopiController"},"getFile"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":123,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\WopiController"},"getFile"]},{"file":"/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Richdocuments\\Controller\\WopiController","getFile",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"fileId":"3243_ocytbc05yupz","_route":"richdocuments.wopi.getFile"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"fileId":"3243_ocytbc05yupz","_route":"richdocuments.wopi.getFile"}]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"fileId":"3243_ocytbc05yupz","_route":"richdocuments.wopi.getFile"}]},{"file":"/var/www/html/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/wopi/files/3243_ocytbc05yupz/contents"]},{"file":"/var/www/html/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/apps-extra/files_lock/lib/Service/FileService.php","Line":99},"CustomMessage":"--"},"userAgent":"LOOLWSD WOPI Agent master..","version":"18.0.0.2"}
ArtificialOwl commented 4 years ago

fixed.