nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
349 stars 115 forks source link

Edited documents cannot be saved when using encryption (server-side) #833

Open jimbolaya opened 4 years ago

jimbolaya commented 4 years ago

This seems similar to #781 but I'm still having issues and that's listed as closed. I'm currently running 16.0.8 with php 7.3 on apache2 on Debian 9 with collaboraonline packages v6.2.10 and loolwsd 4.2.0. This has worked fine until recently. I don't know which update broke the functionality.

If I open a file that I've created before, it opens and I can see it. If I make any change at all and attempt to save it I get "Failed to read document from storage. Please contact your storage server (\<mydomain>) administrator."

I can also create a file and open it fine, and can edit it, but again, it fails to save with the same error.

Any time thereafter, I cannot open any file I attempted to edit as it fails with the same message. I attempted to rollback to 3.5.0 with no success.

I've duplicated this behavior on Vivaldi (Chrome) and Firefox.

Here's the nextcloud logs from opening a file I can see (haven't edited):

{"reqId":"33YEjSzXGqz7oBO8YrBE","level":0,"time":"2020-02-19T14:02:59+00:00","remoteAddr":"<server ip>","user":"--","app":"richdocuments","method":"GET","url":"\/index.php\/apps\/richdocuments\/wopi\/files\/41888_5127bcd54d75c?access_token=e5MqjzmozWPmshbfbyIz2EOzRYP6kDhN&access_token_ttl=0","message":"Loaded WOPI Token record: {\"id\":\"235\",\"owner_uid\":\"<myuser>\",\"editor_uid\":\"<myuser>\",\"fileid\":\"41888\",\"version\":\"0\",\"canwrite\":\"1\",\"server_host\":\"https:\/\/<mydomain>\/\",\"token\":\"e5MqjzmozWPmshbfbyIz2EOzRYP6kDhN\",\"expiry\":\"1582122777\",\"guest_displayname\":null,\"template_destination\":\"0\",\"hide_download\":\"0\",\"direct\":\"0\",\"is_remote_token\":\"0\",\"remote_server\":\"\",\"remote_server_token\":\"\",\"template_id\":\"0\"}.","userAgent":"LOOLWSD WOPI Agent 4.2.0","version":"16.0.8.1"}
{"reqId":"qjnOto3JzdJZk50IjFuZ","level":0,"time":"2020-02-19T14:02:59+00:00","remoteAddr":"<server ip>","user":"--","app":"richdocuments","method":"GET","url":"\/index.php\/apps\/richdocuments\/wopi\/files\/41888_5127bcd54d75c\/contents?access_token=e5MqjzmozWPmshbfbyIz2EOzRYP6kDhN&access_token_ttl=0","message":"Loaded WOPI Token record: {\"id\":\"235\",\"owner_uid\":\"<myuser>\",\"editor_uid\":\"<myuser>\",\"fileid\":\"41888\",\"version\":\"0\",\"canwrite\":\"1\",\"server_host\":\"https:\/\/<mydomain>\/\",\"token\":\"e5MqjzmozWPmshbfbyIz2EOzRYP6kDhN\",\"expiry\":\"1582122777\",\"guest_displayname\":null,\"template_destination\":\"0\",\"hide_download\":\"0\",\"direct\":\"0\",\"is_remote_token\":\"0\",\"remote_server\":\"\",\"remote_server_token\":\"\",\"template_id\":\"0\"}.","userAgent":"LOOLWSD WOPI Agent 4.2.0","version":"16.0.8.1"}

Here's the nextcloud log for a file I cannot open:

{"reqId":"q2gfWUOrgwaoquuqcPGc","level":3,"time":"2020-02-19T14:03:31+00:00","remoteAddr":"<workstation ip>","user":"<myuser>","app":"PHP","method":"GET","url":"\/index.php\/apps\/richdocuments\/index?fileId=111012&requesttoken=1ZZCpGN1EPRTxq3ffZqT6zyX0%2FBrDxCf6fw929yhxts%3D%3A5ud17y42WKYZh9eHTKzgoW%2FClcUedmnKg8RV4rfi%2Fqs%3D","message":"fread(): Length parameter must be greater than 0 at \/var\/www\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/Wrapper.php#91","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko\/20100101 Firefox\/72.0","version":"16.0.8.1"}
{"reqId":"ou1yO2GWveE8UWa7DAhu","level":0,"time":"2020-02-19T14:03:32+00:00","remoteAddr":"<server ip>","user":"--","app":"richdocuments","method":"GET","url":"\/index.php\/apps\/richdocuments\/wopi\/files\/111012_5127bcd54d75c?access_token=EF2RmY0H3nGCraxsqV70YtZ4xoUmbMcI&access_token_ttl=0","message":"Loaded WOPI Token record: {\"id\":\"236\",\"owner_uid\":\"<myuser>\",\"editor_uid\":\"<myuser>\",\"fileid\":\"111012\",\"version\":\"0\",\"canwrite\":\"1\",\"server_host\":\"https:\/\/<mydomain>\/\",\"token\":\"EF2RmY0H3nGCraxsqV70YtZ4xoUmbMcI\",\"expiry\":\"1582122811\",\"guest_displayname\":null,\"template_destination\":\"0\",\"hide_download\":\"0\",\"direct\":\"0\",\"is_remote_token\":\"0\",\"remote_server\":\"\",\"remote_server_token\":\"\",\"template_id\":\"0\"}.","userAgent":"LOOLWSD WOPI Agent 4.2.0","version":"16.0.8.1"}
{"reqId":"2V4apJqFGclbWrer5XZz","level":0,"time":"2020-02-19T14:03:32+00:00","remoteAddr":"<server ip>","user":"--","app":"richdocuments","method":"GET","url":"\/index.php\/apps\/richdocuments\/wopi\/files\/111012_5127bcd54d75c\/contents?access_token=EF2RmY0H3nGCraxsqV70YtZ4xoUmbMcI&access_token_ttl=0","message":"Loaded WOPI Token record: {\"id\":\"236\",\"owner_uid\":\"<myuser>\",\"editor_uid\":\"<myuser>\",\"fileid\":\"111012\",\"version\":\"0\",\"canwrite\":\"1\",\"server_host\":\"https:\/\/<mydomain>\/\",\"token\":\"EF2RmY0H3nGCraxsqV70YtZ4xoUmbMcI\",\"expiry\":\"1582122811\",\"guest_displayname\":null,\"template_destination\":\"0\",\"hide_download\":\"0\",\"direct\":\"0\",\"is_remote_token\":\"0\",\"remote_server\":\"\",\"remote_server_token\":\"\",\"template_id\":\"0\"}.","userAgent":"LOOLWSD WOPI Agent 4.2.0","version":"16.0.8.1"}
{"reqId":"2V4apJqFGclbWrer5XZz","level":3,"time":"2020-02-19T14:03:33+00:00","remoteAddr":"<server ip>","user":"--","app":"PHP","method":"GET","url":"\/index.php\/apps\/richdocuments\/wopi\/files\/111012_5127bcd54d75c\/contents?access_token=EF2RmY0H3nGCraxsqV70YtZ4xoUmbMcI&access_token_ttl=0","message":"fread(): Length parameter must be greater than 0 at \/var\/www\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/Wrapper.php#91","userAgent":"LOOLWSD WOPI Agent 4.2.0","version":"16.0.8.1"}

This seems significant:

fread(): Length parameter must be greater than 0 at \/var\/www\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/Wrapper.php#91

but I don't really know.

juliushaertl commented 4 years ago

Could you share some retails about the external storage you are using and the config of that?

jimbolaya commented 4 years ago

I've mounted a couple of local drives read-only for music and movies, but I can't imagine this is touching that. Other than that, I have no external storage.

To be honest, I'm not entirely clear how the Nextcloud user directories interact with Collabora, but these are all files in my Nextcloud user directory. Is it possible another app is interfering here?

jimbolaya commented 4 years ago

I've got some more logs to provide. In my syslog I have the following when I try to read an "edited" file:

Feb 26 11:10:02 myserver loolwsd[12117]: wsd-12117-11184 2020-02-26 16:10:02.628102 [ docbroker_004 ] ERR  WOPI::GetFile failed with 400 Bad Request| wsd/Storage.cpp:860
Feb 26 11:10:02 myserver loolwsd[12117]: wsd-12117-11184 2020-02-26 16:10:02.628299 [ docbroker_004 ] ERR  loading document exception: WOPI::GetFile failed| wsd/DocumentBroker.cpp:1331
Feb 26 11:10:02 myserver loolwsd[12117]: wsd-12117-11184 2020-02-26 16:10:02.628320 [ docbroker_004 ] ERR  Failed to add session to [/index.php/apps/richdocuments/wopi/files/103684_5127bcd54d75c] with URI [https://myserver.org/index.php/apps/richdocuments/wopi/files/103684_5127bcd54d75c?access_token=a8NCCjkTkxanB9XeL0ZJ8dnnSa5yAfJ3&access_token_ttl=0]: WOPI::GetFile failed| wsd/DocumentBroker.cpp:1293
Feb 26 11:10:02 myserver loolwsd[12117]: wsd-12117-11184 2020-02-26 16:10:02.628392 [ docbroker_004 ] ERR  No DocBroker found, or DocBroker marked to be destroyed. Terminating session ToClient-02e| wsd/ClientSession.cpp:332
Feb 26 11:10:02 myserver loolwsd[12117]: wsd-12117-11184 2020-02-26 16:10:02.628422 [ docbroker_004 ] ERR  No DocBroker found, or DocBroker marked to be destroyed. Terminating session ToClient-02e| wsd/ClientSession.cpp:332
Feb 26 11:10:02 myserver loolwsd[12117]: wsd-12117-11184 2020-02-26 16:10:02.797388 [ docbroker_004 ] ERR  Invalid or unknown session [02e] to remove.| wsd/DocumentBroker.cpp:1368
Feb 26 11:10:04 myserver loolwsd[12117]: wsd-12117-12134 2020-02-26 16:10:04.629465 [ prisoner_poll ] WRN  Prisoner connection disconnected but without valid socket.| wsd/LOOLWSD.cpp:1848kit-08131-12135 2020-02-26 16:10:04.629454 [ kit_spare_004 ] ERR  #13: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1104

I will try to see if I can bump up the log verboseness on my loolwsd instance.

jimbolaya commented 4 years ago

I set logging to debug and got a ton of output. I posted it on pastebin:

https://pastebin.com/E6wgiZ45

jimbolaya commented 4 years ago

I did some more investigating and found if I attempt to download the file from the Nextcloud web interface, it's size is zero (0). However, I can restore a previous version and it works fine.

Somehow, richdocuments appears to be zeroing out the value of the file.

I'll do some more experiments.

juliushaertl commented 4 years ago

What is returned if you request the url that is logged in the collabora logs

https://myserver.org/index.php/apps/richdocuments/wopi/files/103684_5127bcd54d75c?access_token=a8NCCjkTkxanB9XeL0ZJ8dnnSa5yAfJ3&access_token_ttl=0

from

Feb 26 11:10:02 myserver loolwsd[12117]: wsd-12117-11184 2020-02-26 16:10:02.628320 [ docbroker_004 ] ERR  Failed to add session to [/index.php/apps/richdocuments/wopi/files/103684_5127bcd54d75c] with URI [https://myserver.org/index.php/apps/richdocuments/wopi/files/103684_5127bcd54d75c?access_token=a8NCCjkTkxanB9XeL0ZJ8dnnSa5yAfJ3&access_token_ttl=0]: WOPI::GetFile failed| wsd/DocumentBroker.cpp:1293
jimbolaya commented 4 years ago

I think I cleaned up my other versions, here's the output using test file created for this.

Entering the URL, I get a JSON (?) page with the following information. JSON tab:

BaseFileName        "test.odt"
Size        9059
Version     "0"
UserId      "myuser"
OwnerId     "myuser"
UserFriendlyName    "myuser"
UserExtraInfo
avatar      "https://myserver.org/index.php/avatar/myuser/32"
UserCanWrite        true
UserCanNotWriteRelative     true
PostMessageOrigin   "https://myserver.org/"
LastModifiedTime    "2019-03-28T14:07:36.000000Z"
SupportsRename      true
UserCanRename       true
EnableInsertRemoteImage     true
EnableShare true
HideUserList        "desktop"
DisablePrint        "0"
DisableExport       "0"
DisableCopy "0"
HideExportOption    "0"
HidePrintOption     "0"
DownloadAsPostMessage       false

There's a "Raw Data" tab that has the same info. and a Response Headers tab

Cache-Control: no-cache, no-store, must-revalidate
Connection: Keep-Alive
Content-Length: 600
Content-Security-Policy: default-src 'none';base-uri 'none';manifest-src 'self';script-src 'nonce-SFpOVlo1eklWeEZQWmRuVGdvWlAyU3FnaGttZ0w1YzM3L1NtSDBrK0hpWT06U2VBNUh2S2RCRk04TStpdzlmWWo3SDNJODN2Vkg4SnRoNFdKVVhwWGIzND0=';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self' data:;connect-src 'self' stun.nextcloud.com:443;media-src 'self';frame-src 'nonce-SFpOVlo1eklWeEZQWmRuVGdvWlAyU3FnaGttZ0w1YzM3L1NtSDBrK0hpWT06U2VBNUh2S2RCRk04TStpdzlmWWo3SDNJODN2Vkg4SnRoNFdKVVhwWGIzND0=' https://documents.myserver.org data:;child-src 'self';frame-ancestors 'self';worker-src 'self' blob:
Content-Type: application/json; charset=utf-8
Date: Mon, 02 Mar 2020 20:13:23 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=98
Pragma: no-cache
Referrer-Policy: no-referrer
Server: Apache
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: sameorigin
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-XSS-Protection: 1; mode=block

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.5
Connection: keep-alive
DNT: 1
Host: myserver.org
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0
milkomeda commented 4 years ago

Same problem here. Downgrade of richdocuments app to 3.5.0 fixed the problem for me.

juliushaertl commented 4 years ago

The output looks pretty normal. Could you check if downloading the file manually by appending /contents to the url also produces that error? Maybe I can provide you with some additional logging patch then.

myserver.org/index.php/apps/richdocuments/wopi/files/103684_5127bcd54d75c/contents?access_token=a8NCCjkTkxanB9XeL0ZJ8dnnSa5yAfJ3&access_token_ttl=0

juliushaertl commented 4 years ago

And could you also provide a system report from the support app as well as a list of configured external storages for completeness, so we don't miss anything there.

jimbolaya commented 4 years ago

The output looks pretty normal. Could you check if downloading the file manually by appending /contents to the url also produces that error?

This just took me to my main Files folder view. No errors on the web page. Web server logs show a 302 response (redirect it looks like):

GET /index.php/apps/richdocuments/wopi/files/41103_5127bcd54d75c/content?access_token=fRHD71Qo0UKHFlDcJfcqqsNsBDCPWAKW&access_token_ttl=0 HTTP/1.1" 302 1021 

It looks like access_token changes every time I try to do something.

I'm not sure if this is significant, but I also found the following entiries in my syslog:

Mar  3 05:45:05 myserver loolwsd[29802]: wsd-29802-29824 2020-03-03 10:45:05.006536 [ websrv_poll ] ERR  Socket #17 SSL BIO error: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request (0: Success)| ./net/SslSocket.hpp:291
Mar  3 05:45:05 myserver loolwsd[29802]: wsd-29802-29824 2020-03-03 10:45:05.006593 [ websrv_poll ] ERR  Error while handling poll for socket #17 in websrv_poll: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request| ./net/Socket.hpp:594

Does this mean I've misconfigured some SSL statements somewhere (perhaps likely after the recent changes to the storage section in loolwsd.xml)?

After moving to collaboraonline 6.2 with the corresponding loolwsd update, the storage section had it's own ssl section that I left alone. When I started having this problem, one thing I did was to add my ssl settings from the main section (cert file locations and the like) to the storage section, but I got the same error. I assumed this has nothing to do with the current issue.

Here's the system report. I zipped it up since it wont let me paste an ".md" file in.

2020-03-03.md.zip

Thank you for your help on this.

juliushaertl commented 4 years ago

/contents not /content :wink:

jimbolaya commented 4 years ago

/contents not /content 😉

D'oh

The web page says File Not Found. Response 400 from the Apache logs.

RobertBozic commented 4 years ago

Same problem here. Downgrade of richdocuments app to 3.5.0 fixed the problem for me.

Would you be so kind and tell how to downgrade? I can not from nextcloud...

milkomeda commented 4 years ago

Same problem here. Downgrade of richdocuments app to 3.5.0 fixed the problem for me.

Would you be so kind and tell how to downgrade? I can not from nextcloud...

Deactivated first and uninstalled app using nextcloud web interface. Afterwards ssh to Server, downloaded version 3.5.0 from GitHub releases and extracted to apps directory. Installed and activated then using nextcloud web interface.

jimbolaya commented 4 years ago

Deactivated first and uninstalled app using nextcloud web interface. Afterwards ssh to Server, downloaded version 3.5.0 from GitHub releases and extracted to apps directory. Installed and activated then using nextcloud web interface.

OK, following this, I can now edit my documents again. Thank you.

I'm not sure what I did differently before where it didn't work to downgrade richdocuments.

RobertBozic commented 4 years ago

Maybe wsomeone helps. I advise upgrade to the NX18 and latest Collabora CODE. Everything works ok on my side....

mjog commented 4 years ago

I just installed NC19 and latest Collabora CODE and am getting WOPI::GetFile failed with 400 Bad Request errors above when opening empty documents (e.g. as created by clicking the + button in the files app). If the document has contents already, it opens fine.

jimbolaya commented 4 years ago

I have some updates on this for my side.

I was going to change a user's password, but I couldn't since I found the encryption to be messed up. The thread I read mentioned messing with encryption to get things to work. I believe that is all a part of this issue.

I've had my server files encrypted or for some time and I haven't really touched it since then. Since things kept working fine, I didn't think anything of it until my issues with Collabora and attempting to change passwords.

I haven't taken a thorough look at the release notes, but if you've had encryption enabled for an extended period of time with a recovery key, it might be a good idea to take some down time to decrypt your servers files and re-encrypt them if you've had encryption enabled for a very long time as I have. I think the infrastructure has changed enough things that something probably got missed, especially with the breakneck speed of development.

I don't really have any proof of this, but richdocuments 3.7.0 started working after I decrypted my server's files. Since I don't have anything critically private and I'm the only user, I may just leave my files unencrypted. I realize for larger installations, this could be a giant hassle, but it may be worth looking into, or at least testing in a development or test environment if you have that luxury.

ShellCode33 commented 4 years ago

I'm having this exact same issue. I'm on Nextcloud 18.0.6 which I updated yesterday from NC15 with PHP 7.0 all the way up to NC18 with PHP7.3 (like @jimbolaya I haven't used it for a while and I have server side encryption enabled).

I downgraded to richdocuments 3.5.0 as @milkomeda said and now everything works fine. I tried almost all versions of richdocuments until 3.5.0, it seems to me that 3.5.1 introduced an encryption-related bug somewhere. Something not backward compatible maybe ? As both @jimbolaya and I had an old instance we haven't used for a while.

When I try to open a document in Collabora, the following exception is thrown :

Private Key missing for user: please try to log-out and log-in again

Did the path of the private key changed in 3.5.1 ?

Full log :

{"reqId":"dASEtKg87Z7Ci5z4Z0xY","level":3,"time":"2020-07-07T18:35:29+00:00","remoteAddr":"192.168.1.1","user":"shellcode","app":"richdocuments","method":"POST","url":"/index.php/apps/richdocuments/wopi/files/24042_ocf0sndqo3s8/contents?access_token=XXXXXXXX&access_token_ttl=0","message":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/html/apps/encryption/lib/KeyManager.php","line":444,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->","args":[]},{"file":"/var/www/html/apps/encryption/lib/Crypto/Encryption.php","line":202,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->","args":["/shellcode/files/Somewhere \u00e9t\u00e9 2020/test.ods","shellcode"]},{"file":"/var/www/html/lib/private/Files/Stream/Encryption.php","line":269,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->","args":["/shellcode/files/Somewhere \u00e9t\u00e9 2020/test.ods","shellcode","w",{"oc_encryption_module":"OC_DEFAULT_MODULE","cipher":"AES-256-CTR","signed":"true"},{"users":["shellcode"],"public":false}]},{"function":"stream_open","class":"OC\\Files\\Stream\\Encryption","type":"->","args":["ocencryption://","w",0,null]},{"file":"/var/www/html/lib/private/Files/Stream/Encryption.php","line":207,"function":"fopen","args":["ocencryption://","w",false,null]},{"file":"/var/www/html/lib/private/Files/Stream/Encryption.php","line":187,"function":"wrapSource","class":"OC\\Files\\Stream\\Encryption","type":"::","args":[null,null,"ocencryption","OC\\Files\\Stream\\Encryption","w"]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Encryption.php","line":469,"function":"wrap","class":"OC\\Files\\Stream\\Encryption","type":"::","args":[null,"files/Somewhere \u00e9t\u00e9 2020/test.ods","/shellcode/files/Somewhere \u00e9t\u00e9 2020/test.ods",{"oc_encryption_module":"OC_DEFAULT_MODULE","cipher":"AES-256-CTR","signed":"true"},"shellcode",{"__class__":"OCA\\Encryption\\Crypto\\Encryption"},{"__class__":"OC\\Files\\Storage\\Home"},{"cache":null,"scanner":null,"watcher":null,"propagator":null,"updater":null,"__class__":"OC\\Files\\Storage\\Wrapper\\Encryption"},{"__class__":"OC\\Encryption\\Util"},{"__class__":"OC\\Encryption\\File"},"w",8304,10,8192,true]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["files/Somewhere \u00e9t\u00e9 2020/test.ods","w"]},{"file":"/var/www/html/lib/private/Files/View.php","line":670,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/Somewhere \u00e9t\u00e9 2020/test.ods","w"]},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":71,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["/shellcode/files/Somewhere \u00e9t\u00e9 2020/test.ods",null]},{"file":"/var/www/html/apps/richdocuments/lib/Controller/WopiController.php","line":453,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->","args":[null]},{"file":"/var/www/html/apps/richdocuments/lib/Controller/WopiController.php","line":623,"function":"OCA\\Richdocuments\\Controller\\{closure}","class":"OCA\\Richdocuments\\Controller\\WopiController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/richdocuments/lib/Controller/WopiController.php","line":454,"function":"retryOperation","class":"OCA\\Richdocuments\\Controller\\WopiController","type":"->","args":[{"__class__":"Closure"}]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"putFile","class":"OCA\\Richdocuments\\Controller\\WopiController","type":"->","args":["24042","bP0Q6APsvik6S4hDru81GGFMBP17xXbR"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\WopiController"},"putFile"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\WopiController"},"putFile"]},{"file":"/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Richdocuments\\Controller\\WopiController","putFile",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"fileId":"24042_ocf0sndqo3s8","_route":"richdocuments.wopi.putFile"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"fileId":"24042_ocf0sndqo3s8","_route":"richdocuments.wopi.putFile"}]},{"file":"/var/www/html/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"fileId":"24042_ocf0sndqo3s8","_route":"richdocuments.wopi.putFile"}]},{"file":"/var/www/html/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/wopi/files/24042_ocf0sndqo3s8/contents"]},{"file":"/var/www/html/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/apps/encryption/lib/Session.php","Line":90,"Hint":"Private Key missing for user: please try to log-out and log-in again","CustomMessage":"getFile failed"},"userAgent":"LOOLWSD WOPI Agent 4.2.5","version":"18.0.6.0"}
jimbolaya commented 4 years ago

If it's possible, I would recommend 1) backing up 2) decrypting your data, make sure richdocuments works, then 3) re-encrypting and see if it still works.

I've done step 1 and 2, but I haven't re-encrypted my data yet, but I'll probably do that at some point in the future.

ShellCode33 commented 4 years ago

TBH I really don't want to go through that, I've had enough trouble with the upgrade this last 48 hours, I will just stick with 3.5.0 until a fix is released. Hopefuly this old version isn't vulnerable to any kind of RCE.

ShellCode33 commented 4 years ago

Now I'm having that issue... https://help.nextcloud.com/t/richdocuments-upgrade-to-loolwsd-4-2-broke-anonymous-editing/67665 Issue that richdocuments 3.5.1 apparently fixed :( Fortunately after I did some digging, I came across the pull request #755, so I applied the fix to /var/www/html/apps/richdocuments/lib/Service/UserScopeService.php and it's now working again.