{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/16344","labels_url":"https://api.github.com/repos/owncloud/core/issues/16344/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/16344/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/16344/events","html_url":"https://github.com/owncloud/core/issues/16344","id":76092267,"number":16344,"title":"Federated Sharing: second user can't edit the file a second time when encryption is enabled","user":{"login":"jnfrmarks","id":8480343,"avatar_url":"https://avatars.githubusercontent.com/u/8480343?v=3","gravatar_id":"","url":"https://api.github.com/users/jnfrmarks","html_url":"https://github.com/jnfrmarks","followers_url":"https://api.github.com/users/jnfrmarks/followers","following_url":"https://api.github.com/users/jnfrmarks/following{/other_user}","gists_url":"https://api.github.com/users/jnfrmarks/gists{/gist_id}","starred_url":"https://api.github.com/users/jnfrmarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnfrmarks/subscriptions","organizations_url":"https://api.github.com/users/jnfrmarks/orgs","repos_url":"https://api.github.com/users/jnfrmarks/repos","events_url":"https://api.github.com/users/jnfrmarks/events{/privacy}","received_events_url":"https://api.github.com/users/jnfrmarks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/app:encryption","name":"app:encryption","color":"02d7e1"},{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/core/labels/sev1-critical","name":"sev1-critical","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/31","html_url":"https://github.com/owncloud/core/milestones/8.1-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/31/labels","id":912160,"number":31,"title":"8.1-current","description":"","creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":107,"closed_issues":1201,"state":"open","created_at":"2014-12-22T12:04:01Z","updated_at":"2015-05-20T12:44:01Z","due_on":"2015-04-02T22:00:00Z","closed_at":null},"comments":6,"created_at":"2015-05-13T19:17:00Z","updated_at":"2015-05-20T12:49:06Z","closed_at":null,"body":"### Steps to reproduce\r\n\r\n1. Install 8.1 to two servers\r\n2. on server 2, enable encryption\r\n3. upload a file on server1 \r\n4. Share the file with a user on sever2\r\n5. the user on server 2 accepts the share and edits the file\r\n6. the same user edits the file a second time.\r\n\r\n### Expected behaviour\r\n\r\nThe user can edit the file a second time.\r\n\r\n### Actual behaviour\r\n\r\nThe user is unable to access the file in any way - clicking on the file does not bring up the editor.  This error is thrown in the log file of server 2:\r\n\r\n```\r\n\r\n{\"reqId\":\"Z6kFy1nldtI+UfEWeK+h\",\"remoteAddr\":\"x.x.x.x,\"app\":\"PHP\",\"message\":\"fread(): Length parameter must be greater than 0 at \\/var\\/www\\/html\\/owncloud\\/apps\\/windows_network_drive\\/3rdparty\\/icewind\\/streams\\/src\\/Wrapper.php#67\",\"level\":3,\"time\":\"2015-05-13T19:17:05+00:00\"}\r\n{\"reqId\":\"Z6kFy1nldtI+UfEWeK+h\",\"remoteAddr\":\"x.x.x.x\",\"app\":\"index\",\"message\":\"Exception: {\\\"Exception\\\":\\\"OC\\\\\\\\Encryption\\\\\\\\Exceptions\\\\\\\\DecryptionFailedException\\\",\\\"Message\\\":\\\"Encryption library: Decryption (symmetric) of content failed: error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length\\\",\\\"Code\\\":0,\\\"Trace\\\":\\\"#0 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/apps\\\\\\/encryption\\\\\\/lib\\\\\\/crypto\\\\\\/crypt.php(294): OCA\\\\\\\\Encryption\\\\\\\\Crypto\\\\\\\\Crypt->decrypt(false, false, 'BkLmBfYmtXY\\\\\\/VBC...', 'AES-128-CFB')\\\\n#1 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/apps\\\\\\/encryption\\\\\\/lib\\\\\\/crypto\\\\\\/encryption.php(275): OCA\\\\\\\\Encryption\\\\\\\\Crypto\\\\\\\\Crypt->symmetricDecryptFileContent('### Steps to re...', 'BkLmBfYmtXY\\\\\\/VBC...', 'AES-128-CFB')\\\\n#2 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/stream\\\\\\/encryption.php(432): OCA\\\\\\\\Encryption\\\\\\\\Crypto\\\\\\\\Encryption->decrypt('### Steps to re...')\\\\n#3 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/stream\\\\\\/encryption.php(278): OC\\\\\\\\Files\\\\\\\\Stream\\\\\\\\Encryption->readCache()\\\\n#4 [internal function]: OC\\\\\\\\Files\\\\\\\\Stream\\\\\\\\Encryption->stream_read(8192)\\\\n#5 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/storage\\\\\\/wrapper\\\\\\/encryption.php(173): stream_get_contents(Resource id #416)\\\\n#6 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/storage\\\\\\/wrapper\\\\\\/wrapper.php(230): OC\\\\\\\\Files\\\\\\\\Storage\\\\\\\\Wrapper\\\\\\\\Encryption->file_get_contents('')\\\\n#7 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/view.php(938): OC\\\\\\\\Files\\\\\\\\Storage\\\\\\\\Wrapper\\\\\\\\Wrapper->file_get_contents('')\\\\n#8 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/view.php(471): OC\\\\\\\\Files\\\\\\\\View->basicOperation('file_get_conten...', '\\\\\\/\\\\\\/pre_7.txt', Array)\\\\n#9 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/files\\\\\\/filesystem.php(669): OC\\\\\\\\Files\\\\\\\\View->file_get_contents('\\\\\\/\\\\\\/pre_7.txt')\\\\n#10 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/apps\\\\\\/files_texteditor\\\\\\/ajax\\\\\\/loadfile.php(39): OC\\\\\\\\Files\\\\\\\\Filesystem::file_get_contents('\\\\\\/\\\\\\/pre_7.txt')\\\\n#11 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/route\\\\\\/route.php(153) : runtime-created function(1): require_once('\\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/o...')\\\\n#12 [internal function]: __lambda_func(Array)\\\\n#13 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/private\\\\\\/route\\\\\\/router.php(272): call_user_func('\\\\\\\\x00lambda_478', Array)\\\\n#14 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/lib\\\\\\/base.php(862): OC\\\\\\\\Route\\\\\\\\Router->match('\\\\\\/apps\\\\\\/files_tex...')\\\\n#15 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/index.php(40): OC::handleRequest()\\\\n#16 {main}\\\",\\\"File\\\":\\\"\\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/owncloud\\\\\\/apps\\\\\\/encryption\\\\\\/lib\\\\\\/crypto\\\\\\/crypt.php\\\",\\\"Line\\\":351}\",\"level\":4,\"time\":\"2015-05-13T19:17:05+00:00\"}\r\n\r\n```\r\n\r\nThis message is in the server log file when the file is saved the first time:\r\n\r\n```\r\n\r\n{\"reqId\":\"zTcFB9PjWgVbw7sGgpja\",\"remoteAddr\":\"x.x.x.x\",\"app\":\"webdav client\",\"message\":\"curl GET http:\\/\\/172.18.5.74\\/owncloud\\/public.php\\/webdav\\/ returned status code 507\",\"level\":3,\"time\":\"2015-05-13T19:16:22+00:00\"}\r\n\r\n```\r\n\r\n### Server 1 Host info:\r\n\r\nUbuntu 14.04\r\nPHP 5.5.9\r\n\r\n### Server 2 Host info:\r\n\r\nCentOS 6.6\r\nPHP 5.4.36\r\n\r\n### Server configuration:\r\n\r\nownCloud Enterprise Edition 8.1 beta 1 (daily) Build:2015-05-13T03:08:44+00:00 b626de0b9f135e2993496a8d18f3200dfab72337 \r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/103872565","html_url":"https://github.com/owncloud/core/issues/16344#issuecomment-103872565","issue_url":"https://api.github.com/repos/owncloud/core/issues/16344","id":103872565,"user":{"login":"schiesbn","id":1589737,"avatar_url":"https://avatars.githubusercontent.com/u/1589737?v=3","gravatar_id":"","url":"https://api.github.com/users/schiesbn","html_url":"https://github.com/schiesbn","followers_url":"https://api.github.com/users/schiesbn/followers","following_url":"https://api.github.com/users/schiesbn/following{/other_user}","gists_url":"https://api.github.com/users/schiesbn/gists{/gist_id}","starred_url":"https://api.github.com/users/schiesbn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schiesbn/subscriptions","organizations_url":"https://api.github.com/users/schiesbn/orgs","repos_url":"https://api.github.com/users/schiesbn/repos","events_url":"https://api.github.com/users/schiesbn/events{/privacy}","received_events_url":"https://api.github.com/users/schiesbn/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T12:49:06Z","updated_at":"2015-05-20T12:49:06Z","body":"@th3fallen could you reproduce the issue? Do you already work on a solution?"}}