Skip to content

calculate and update the version of the encryption signature correctly#22267

Merged
DeepDiver1975 merged 2 commits intomasterfrom
fix_encryption2
Feb 10, 2016
Merged

calculate and update the version of the encryption signature correctly#22267
DeepDiver1975 merged 2 commits intomasterfrom
fix_encryption2

Conversation

@schiessle
Copy link
Copy Markdown
Contributor

fix #22260

steps to test:

  1. Enable encryption
  2. Upload a file "test.txt"
  3. Update the file "test.txt" in the web UI with the text editor, save
  4. Check "encrypted" column in database
  5. Update the file "test.txt" with Webdav PUT
  6. Check "encrypted" column in database

cc @PVince81 @LukasReschke

…e a proper version if we move the file over to the original location
@mention-bot
Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @LukasReschke, @DeepDiver1975 and @nickvergessen to be potential reviewers

@schiessle
Copy link
Copy Markdown
Contributor Author

will write/update unit test... but please test this already if it fixes all the issues. @PVince81 maybe you can run smashbox against it? Thanks!

@nickvergessen
Copy link
Copy Markdown
Contributor

Smashing: ⏳

@nickvergessen
Copy link
Copy Markdown
Contributor

{
  "reqId": "byzACVvfhAscHVi4RgP8",
  "remoteAddr": "10.0.2.2",
  "app": "PHP",
  "message": "Call to a member function update() on null at \/home\/nickv\/ownCloud\/master\/core\/lib\/private\/files\/storage\/wrapper\/encryption.php#263",
  "level": 3,
  "time": "2016-02-10T10:34:24+00:00"
}

Exception when trying to delete:

Unexpected response: Status code: 500 - 
Operation "rmdir" must be allowed when share permissions are 31  ["/home/nickv/ownCloud/Smashbox/smashbox/lib/oc-tests/test_sharePermissions.py" at line 251]

@nickvergessen
Copy link
Copy Markdown
Contributor

Unit tests fail as well, so that should help finding the issue

PHP Fatal error:  Call to a member function update() on null in /ssd/jenkins/workspace/core-ci-linux@3/database/sqlite/label/SLAVE/lib/private/files/storage/wrapper/encryption.php on line 263

…t other

apps like files_versions still get the old signature version
@schiessle
Copy link
Copy Markdown
Contributor Author

OK, this version should hopefully work for all tests. I'm not completely happy with the solution but I have no better idea at the moment and it also clean up some stuff (e.g. no more $realPath variable needed).

@LukasReschke
Copy link
Copy Markdown
Member

Did some kinda extensive smoke testing locally. Worked fine 👍

@nickvergessen
Copy link
Copy Markdown
Contributor

Smashbox: ✅

@PVince81
Copy link
Copy Markdown
Contributor

That looks good, even with versions:

| files/test.txt                                                              |         4 |
| files_versions/test                                                         |         0 |
| files_versions/test.txt.v1455113368                                         |         1 |
| files_versions/test.txt.v1455113435                                         |         2 |
| files_versions/test.txt.v1455113498                                         |         3 |
| files_versions/test/test2.txt.v1455113375                                   |         1 |
| files_versions/test/test2.txt.v1455113441                                   |         2 |
| files_versions/test/test2.txt.v1455113487                                   |         3 |

Tested after upgrading with existing encrypted versions.

@PVince81
Copy link
Copy Markdown
Contributor

I also checked that the version files can still be downloaded.

👍

DeepDiver1975 added a commit that referenced this pull request Feb 10, 2016
calculate and update the version of the encryption signature correctly
@DeepDiver1975 DeepDiver1975 merged commit 5c89cf9 into master Feb 10, 2016
@DeepDiver1975 DeepDiver1975 deleted the fix_encryption2 branch February 10, 2016 14:14
@lock
Copy link
Copy Markdown

lock Bot commented Aug 7, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Encryption signature version not increased on upload

6 participants