{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/15774","labels_url":"https://api.github.com/repos/owncloud/core/issues/15774/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/15774/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/15774/events","html_url":"https://github.com/owncloud/core/pull/15774","id":69832669,"number":15774,"title":"fix encryption header error","user":{"login":"jknockaert","id":7431682,"avatar_url":"https://avatars.githubusercontent.com/u/7431682?v=3","gravatar_id":"","url":"https://api.github.com/users/jknockaert","html_url":"https://github.com/jknockaert","followers_url":"https://api.github.com/users/jknockaert/followers","following_url":"https://api.github.com/users/jknockaert/following{/other_user}","gists_url":"https://api.github.com/users/jknockaert/gists{/gist_id}","starred_url":"https://api.github.com/users/jknockaert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jknockaert/subscriptions","organizations_url":"https://api.github.com/users/jknockaert/orgs","repos_url":"https://api.github.com/users/jknockaert/repos","events_url":"https://api.github.com/users/jknockaert/events{/privacy}","received_events_url":"https://api.github.com/users/jknockaert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-21T12:23:41Z","updated_at":"2015-04-21T12:39:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/15774","html_url":"https://github.com/owncloud/core/pull/15774","diff_url":"https://github.com/owncloud/core/pull/15774.diff","patch_url":"https://github.com/owncloud/core/pull/15774.patch"},"body":"When moving back the pointer to position 0 (using stream_seek), the pointer on the encrypted stream will be moved to the position immediately after the header. Reading the header again (invoked by stream_read) will cause an error, writing the header again (invoked by stream_write) will corrupt the file. Reading/writing the header should therefore happen when opening the file rather than upon read or write. Note that a side-effect of this PR is that empty files will still get an encryption header; I think that is OK, but it is different from how it was originally implemented.\r\n@schiesbn @PVince81 Could you pls check?"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/94777859","html_url":"https://github.com/owncloud/core/pull/15774#issuecomment-94777859","issue_url":"https://api.github.com/repos/owncloud/core/issues/15774","id":94777859,"user":{"login":"owncloud-bot","id":2709266,"avatar_url":"https://avatars.githubusercontent.com/u/2709266?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud-bot","html_url":"https://github.com/owncloud-bot","followers_url":"https://api.github.com/users/owncloud-bot/followers","following_url":"https://api.github.com/users/owncloud-bot/following{/other_user}","gists_url":"https://api.github.com/users/owncloud-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud-bot/subscriptions","organizations_url":"https://api.github.com/users/owncloud-bot/orgs","repos_url":"https://api.github.com/users/owncloud-bot/repos","events_url":"https://api.github.com/users/owncloud-bot/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud-bot/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T12:39:38Z","updated_at":"2015-04-21T12:39:38Z","body":"\nRefer to this link for build results (access rights to CI server needed): \nhttps://ci.owncloud.org//job/pull-request-analyser-ng-simple/11712/<h2>Build result: FAILURE</span></h2>[...truncated 13 lines...] > git config --local --remove-section credential # timeout=10 > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.gitusing GIT_SSH to set credentials using .gitcredentials to set credentials > git config --local credential.helper store --file=/tmp/git5629149500390343071.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/*:refs/remotes/origin/pr/* > git config --local --remove-section credential # timeout=10 > git rev-parse refs/remotes/origin/pr/15774/merge^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/pr/15774/merge^{commit} # timeout=10Checking out Revision 097d45717f114d428226b9fff1d6643e9214fc59 (refs/remotes/origin/pr/15774/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 097d45717f114d428226b9fff1d6643e9214fc59First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » SLAVEpull-request-analyser-ng-simple » SLAVE completed with result FAILURESetting status of e6a432d434c75d01dfa574f6c226fd27a23e8004 to FAILURE with url https://ci.owncloud.org/job/pull-request-analyser-ng-simple/11712/ and message: Merged build finished.\n:bomb: Test FAILed. :bomb:\n![nooo432](https://cloud.githubusercontent.com/assets/1005065/6687475/9f3ddeae-ccab-11e4-836c-b1def1add2f1.jpg)\n"}}