Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable10] Backport of Add encryption version fix command #35000

Merged
merged 3 commits into from
Apr 12, 2019

Conversation

sharidas
Copy link
Contributor

@sharidas sharidas commented Apr 10, 2019

Backport of encryption app PR owncloud/encryption#115

Add a new command to fix the encryption
version. This would help the admin to
fix the issues related to encryption version
mismatch for the files.

Signed-off-by: Sujith H [email protected]

Description

The encryption:fixencryptedversion command becomes handy when the encrypted version in the filecache becomes inconsistent. It helps to fix the encrypted version, so that user doesn't hit with Bad Signature errors while trying to view or download the file from oC UI.

Related Issue

  • Fixes <issue_link>

Motivation and Context

The encryption:fixencryptedversion command becomes handy when the encrypted version in the filecache becomes inconsistent. It helps to fix the encrypted version, so that user doesn't hit with Bad Signature errors while trying to view or download the file from oC UI.

How Has This Been Tested?

  • Ran unit tests

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@sharidas sharidas added this to the development milestone Apr 10, 2019
@sharidas sharidas self-assigned this Apr 10, 2019
@sharidas sharidas force-pushed the fix-encryption-version-command-stable10 branch from 75000ef to c5b264e Compare April 10, 2019 05:40
@codecov
Copy link

codecov bot commented Apr 10, 2019

Codecov Report

Merging #35000 into stable10 will decrease coverage by 19.32%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             stable10   #35000       +/-   ##
===============================================
- Coverage       64.29%   44.97%   -19.33%     
===============================================
  Files            1285      116     -1169     
  Lines           76824    11565    -65259     
  Branches         1307     1307               
===============================================
- Hits            49394     5201    -44193     
+ Misses          27049     5983    -21066     
  Partials          381      381
Flag Coverage Δ Complexity Δ
#javascript 53.01% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 30.71% <ø> (-34.79%) 0 <ø> (-20040)
Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Storage/DAV.php 59.45% <0%> (-21.64%) 0% <0%> (ø)
apps/updatenotification/templates/admin.php
lib/private/Encryption/Keys/Storage.php
lib/private/App/CodeChecker/NodeVisitor.php
lib/private/RedisFactory.php
apps/dav/lib/Avatars/AvatarNode.php
...s/dav/appinfo/Migrations/Version20170202213905.php
apps/dav/lib/Upload/ChunkLocationProvider.php
apps/files/lib/AppInfo/Application.php
apps/systemtags/list.php
... and 1161 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 443bf44...c5b264e. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 10, 2019

Codecov Report

Merging #35000 into stable10 will increase coverage by 0.17%.
The diff coverage is 92.2%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #35000      +/-   ##
==============================================
+ Coverage       64.29%   64.46%   +0.17%     
- Complexity      20040    20061      +21     
==============================================
  Files            1285     1286       +1     
  Lines           76824    76925     +101     
  Branches         1307     1307              
==============================================
+ Hits            49393    49593     +200     
+ Misses          27050    26951      -99     
  Partials          381      381
Flag Coverage Δ Complexity Δ
#javascript 53.01% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.68% <92.2%> (+0.19%) 20061 <21> (+21) ⬆️
Impacted Files Coverage Δ Complexity Δ
...pps/encryption/lib/Command/FixEncryptedVersion.php 92.2% <92.2%> (ø) 21 <21> (?)
apps/encryption/appinfo/routes.php 0% <0%> (-100%) 0% <0%> (ø)
lib/private/Share/Share.php 71.61% <0%> (+0.41%) 507% <0%> (ø) ⬇️
lib/private/Files/Stream/Encryption.php 94.82% <0%> (+0.57%) 53% <0%> (ø) ⬇️
lib/private/Files/View.php 86.14% <0%> (+1.6%) 399% <0%> (ø) ⬇️
apps/encryption/lib/KeyManager.php 83.67% <0%> (+6.93%) 83% <0%> (ø) ⬇️
apps/encryption/lib/Crypto/Crypt.php 88.75% <0%> (+7.08%) 67% <0%> (ø) ⬇️
lib/private/Files/Storage/Wrapper/Encryption.php 76.41% <0%> (+8.35%) 156% <0%> (ø) ⬇️
apps/encryption/lib/Crypto/Encryption.php 80.6% <0%> (+10.9%) 55% <0%> (ø) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d517d59...c530242. Read the comment docs.

@sharidas
Copy link
Contributor Author

Tried to run unit test, inorder to reproduce the error. Unfortunately I am hit with error shown below:

sujith@sujith-ownCloud  /tmp/test  ➦ 183c548 ●  ./tests/drone/test-phpunit.sh 
+ export ZEND_DONT_UNLOAD_MODULES=1
+ ZEND_DONT_UNLOAD_MODULES=1
++ pwd
+++ dirname ./tests/drone/test-phpunit.sh
++ cd ./tests/drone
++ pwd -P
+ [[ /tmp/test == \/\t\m\p\/\t\e\s\t\/\t\e\s\t\s\/\d\r\o\n\e ]]
+ [[ '' == \s\q\l\i\t\e ]]
+ [[ -z '' ]]
+ GROUP=
+ php occ app:enable encryption
Cannot load Xdebug - it was already loaded
encryption enabled
+ php occ app:list
Cannot load Xdebug - it was already loaded
Enabled:
  - comments: 0.3.0
  - dav: 0.4.0
  - encryption: 1.3.1
  - federatedfilesharing: 0.4.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_sharing: 0.11.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - testing: 0.1.0
  - updatenotification: 0.2.1
+ phpunit_cmd='php ./lib/composer/bin/phpunit'
+ [[ '' == \t\r\u\e ]]
+ [[ -n '' ]]
+ php ./lib/composer/bin/phpunit --configuration tests/phpunit-autotest.xml --coverage-clover tests/output/coverage/autotest-clover-.xml
Cannot load Xdebug - it was already loaded
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.2.16-1+ubuntu18.04.1+deb.sury.org+1 with Xdebug 2.7.0
Configuration: /tmp/test/tests/phpunit-autotest.xml

...........................................................    59 / 10144 (  0%)
..........................S................................   118 / 10144 (  1%)
...........................................................   177 / 10144 (  1%)
...........................................................   236 / 10144 (  2%)
...........................................................   295 / 10144 (  2%)
...........................................................   354 / 10144 (  3%)
...........................................................   413 / 10144 (  4%)
...........................................................   472 / 10144 (  4%)
...........................................................   531 / 10144 (  5%)
...........................................................   590 / 10144 (  5%)
...........................................................   649 / 10144 (  6%)
...........................................................   708 / 10144 (  6%)
...........................................................   767 / 10144 (  7%)
...........................................................   826 / 10144 (  8%)
...........................................................   885 / 10144 (  8%)
...........................................................   944 / 10144 (  9%)
...........................................................  1003 / 10144 (  9%)
...........................................................  1062 / 10144 ( 10%)
...........................................................  1121 / 10144 ( 11%)
...........................................................  1180 / 10144 ( 11%)
...........................................................  1239 / 10144 ( 12%)
.................................SS........................  1298 / 10144 ( 12%)
...........................................................  1357 / 10144 ( 13%)
...........................................................  1416 / 10144 ( 13%)
...........................................................  1475 / 10144 ( 14%)
...........................................................  1534 / 10144 ( 15%)
...........................................................  1593 / 10144 ( 15%)
...........................................................  1652 / 10144 ( 16%)
...........................................................  1711 / 10144 ( 16%)
...........................................................  1770 / 10144 ( 17%)
...........................................................  1829 / 10144 ( 18%)
...........................................................  1888 / 10144 ( 18%)
...........................................................  1947 / 10144 ( 19%)
...........................................................  2006 / 10144 ( 19%)
...........................................................  2065 / 10144 ( 20%)
...........................................................  2124 / 10144 ( 20%)
...........................................................  2183 / 10144 ( 21%)
...........................................................  2242 / 10144 ( 22%)
...........SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS  2301 / 10144 ( 22%)
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS......................  2360 / 10144 ( 23%)
...........................................................  2419 / 10144 ( 23%)
...........................................................  2478 / 10144 ( 24%)
...........................................................  2537 / 10144 ( 25%)
...........................................................  2596 / 10144 ( 25%)
...........................................................  2655 / 10144 ( 26%)
...........................................................  2714 / 10144 ( 26%)
...........................................................  2773 / 10144 ( 27%)
...........................................................  2832 / 10144 ( 27%)
...........................................................  2891 / 10144 ( 28%)
...........................................................  2950 / 10144 ( 29%)
...........................................................  3009 / 10144 ( 29%)
................................S..........................  3068 / 10144 ( 30%)
...........................................................  3127 / 10144 ( 30%)
...........................................................  3186 / 10144 ( 31%)
..S........................................................  3245 / 10144 ( 31%)
...................................S.......................  3304 / 10144 ( 32%)
...........................................................  3363 / 10144 ( 33%)
.................S.........................................  3422 / 10144 ( 33%)
..........................................................S  3481 / 10144 ( 34%)
...........................................................  3540 / 10144 ( 34%)
............................S..............................  3599 / 10144 ( 35%)
...........................................................  3658 / 10144 ( 36%)
...........................................................  3717 / 10144 ( 36%)
...........................................................  3776 / 10144 ( 37%)
...........................................................  3835 / 10144 ( 37%)
...........................................................  3894 / 10144 ( 38%)
...........................................................  3953 / 10144 ( 38%)
...........................................................  4012 / 10144 ( 39%)
...........................................................  4071 / 10144 ( 40%)
...........................................................  4130 / 10144 ( 40%)
...........................................................  4189 / 10144 ( 41%)
...........................................................  4248 / 10144 ( 41%)
...........................................................  4307 / 10144 ( 42%)
............FF.............................................  4366 / 10144 ( 43%)
...........................................................  4425 / 10144 ( 43%)
...........................................................  4484 / 10144 ( 44%)
.............................SSSSSSSSSSSSSSSSSSSSSSSSSSSSSS  4543 / 10144 ( 44%)
SSSSSS......................................EE......F..FF..  4602 / 10144 ( 45%)
.F.....FFFFSSSSSSSSSSSSSSSSSS..............................  4661 / 10144 ( 45%)
...........................................................  4720 / 10144 ( 46%)
...........................................................  4779 / 10144 ( 47%)
...........................................................  4838 / 10144 ( 47%)
..................SSSSSSSSSSSSSSSSSSSSSSSSSSSS....SSSSSSSSS  4897 / 10144 ( 48%)
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS  4956 / 10144 ( 48%)
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS  5015 / 10144 ( 49%)
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.................  5074 / 10144 ( 50%)
...........................................................  5133 / 10144 ( 50%)
.............S.............................................  5192 / 10144 ( 51%)
...........................................................  5251 / 10144 ( 51%)
...........................................................  5310 / 10144 ( 52%)
...........................................................  5369 / 10144 ( 52%)
...........................................................  5428 / 10144 ( 53%)
...........................................................  5487 / 10144 ( 54%)
...........................................................  5546 / 10144 ( 54%)
...........................................................  5605 / 10144 ( 55%)
...........................................................  5664 / 10144 ( 55%)
...........................................................  5723 / 10144 ( 56%)
...........................................................  5782 / 10144 ( 56%)
...........................................................  5841 / 10144 ( 57%)
...........................................................  5900 / 10144 ( 58%)
...........................................................  5959 / 10144 ( 58%)
...........................................................  6018 / 10144 ( 59%)
...........................................................  6077 / 10144 ( 59%)
...........................................................  6136 / 10144 ( 60%)
...........................................................  6195 / 10144 ( 61%)
...........................................................  6254 / 10144 ( 61%)
...........................................................  6313 / 10144 ( 62%)
...........................................................  6372 / 10144 ( 62%)
...........................................................  6431 / 10144 ( 63%)
...........................................................  6490 / 10144 ( 63%)
...........................................................  6549 / 10144 ( 64%)
...........................................................  6608 / 10144 ( 65%)
...........................................................  6667 / 10144 ( 65%)
...........................................................  6726 / 10144 ( 66%)
...........................................................  6785 / 10144 ( 66%)
...........................................................  6844 / 10144 ( 67%)
...........................................................  6903 / 10144 ( 68%)
...........................................................  6962 / 10144 ( 68%)
...........................................................  7021 / 10144 ( 69%)
...........................................................  7080 / 10144 ( 69%)
...........................................................  7139 / 10144 ( 70%)
...........................................................  7198 / 10144 ( 70%)
...........................................................  7257 / 10144 ( 71%)
...........................................................  7316 / 10144 ( 72%)
...........................................................  7375 / 10144 ( 72%)
...........................................................  7434 / 10144 ( 73%)
...........................................................  7493 / 10144 ( 73%)
...........................................................  7552 / 10144 ( 74%)
...........................................................  7611 / 10144 ( 75%)
...........................................................  7670 / 10144 ( 75%)
...........................................................  7729 / 10144 ( 76%)
...........................................................  7788 / 10144 ( 76%)
...........................................................  7847 / 10144 ( 77%)
...........................................................  7906 / 10144 ( 77%)
...........................................................  7965 / 10144 ( 78%)
...........................................................  8024 / 10144 ( 79%)
...........................................................  8083 / 10144 ( 79%)
...........................................................  8142 / 10144 ( 80%)
...........................................................  8201 / 10144 ( 80%)
...........................................................  8260 / 10144 ( 81%)
...........................................................  8319 / 10144 ( 82%)
...........................................................  8378 / 10144 ( 82%)
............................................
mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Warning:  Uncaught OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT * FROM `*PREFIX*accounts` WHERE `lower_user_id` = :dcValue1"; parameters Array
(
    [dcValue1] => 
)
; limit ""; offset "" in /tmp/test/lib/public/AppFramework/Db/Mapper.php:281
Stack trace:
#0 /tmp/test/lib/public/AppFramework/Db/Mapper.php(363): OCP\AppFramework\Db\Mapper->findOneQuery('SELECT * FROM `...', Array, NULL, NULL)
#1 /tmp/test/lib/private/User/AccountMapper.php(129): OCP\AppFramework\Db\Mapper->findEntity('SELECT * FROM `...', Array)
#2 /tmp/test/lib/private/User/Manager.php(190): OC\User\AccountMapper->getByUid('')
#3 /tmp/test/lib/private/User/Session.php(226): OC\User\Manager->get('')
#4 /tmp/test/lib/private/User/Session.php(271): OC\User\Session->getUser()
#5 /tmp/test/lib/private/legacy/user.php(249): OC\User\Session->isLoggedIn()
#6 /tmp/test/lib/private/legacy/util.php(142): OC_User::isLoggedIn()
#7 /tmp/test/lib/private/Files/Mount/Manager.php(72): OC_Util::setupFS()
# in /tmp/test/lib/public/AppFramework/Db/Mapper.php on line 281

Looking at the CI errors its clear that the files are not encrypted. Here is the snapshot of the failure:

1) OCA\Encryption\Tests\Command\FixEncryptedVersionTest::testEncryptedVersionZero
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 'Verifying the content of file /test_enc_version_affected_user1/files/hello.txt\n
-Attempting to fix the path: /test_enc_version_affected_user1/files/hello.txt\n
-Increment the encrypted version to 1\n
 The file /test_enc_version_affected_user1/files/hello.txt is: OK\n
-Fixed the file /test_enc_version_affected_user1/files/hello.txt with version 1\n
-Verifying the content of file /test_enc_version_affected_user1/files/welcome.txt\n
-The file /test_enc_version_affected_user1/files/welcome.txt is: OK\n

/drone/src/apps/encryption/tests/Command/FixEncryptedVersionTest.php:141

2) OCA\Encryption\Tests\Command\FixEncryptedVersionTest::testEncryptedVersionLessThanOriginalValue
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 'Verifying the content of file /test_enc_version_affected_user1/files/foo.txt\n
 The file /test_enc_version_affected_user1/files/foo.txt is: OK\n
 Verifying the content of file /test_enc_version_affected_user1/files/hello.txt\n
-Attempting to fix the path: /test_enc_version_affected_user1/files/hello.txt\n
-Decrement the encrypted version to 1\n
-Increment the encrypted version to 3\n
-Increment the encrypted version to 4\n
-Increment the encrypted version to 5\n
-Increment the encrypted version to 6\n
 The file /test_enc_version_affected_user1/files/hello.txt is: OK\n
-Fixed the file /test_enc_version_affected_user1/files/hello.txt with version 6\n
-Verifying the content of file /test_enc_version_affected_user1/files/welcome.txt\n
-The file /test_enc_version_affected_user1/files/welcome.txt is: OK\n
 Verifying the content of file /test_enc_version_affected_user1/files/world.txt\n
-Attempting to fix the path: /test_enc_version_affected_user1/files/world.txt\n
-Increment the encrypted version to 2\n
-Increment the encrypted version to 3\n
-Increment the encrypted version to 4\n
-Increment the encrypted version to 5\n
 The file /test_enc_version_affected_user1/files/world.txt is: OK\n
-Fixed the file /test_enc_version_affected_user1/files/world.txt with version 5\n

/drone/src/apps/encryption/tests/Command/FixEncryptedVersionTest.php:217

3) OCA\Encryption\Tests\Command\FixEncryptedVersionTest::testEncryptedVersionGreaterThanOriginalValue
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 'Verifying the content of file /test_enc_version_affected_user1/files/foo.txt\n
 The file /test_enc_version_affected_user1/files/foo.txt is: OK\n
 Verifying the content of file /test_enc_version_affected_user1/files/hello.txt\n
-Attempting to fix the path: /test_enc_version_affected_user1/files/hello.txt\n
-Decrement the encrypted version to 14\n
-Decrement the encrypted version to 13\n
-Decrement the encrypted version to 12\n
-Decrement the encrypted version to 11\n
-Decrement the encrypted version to 10\n
-Decrement the encrypted version to 9\n
 The file /test_enc_version_affected_user1/files/hello.txt is: OK\n
-Fixed the file /test_enc_version_affected_user1/files/hello.txt with version 9\n
-Verifying the content of file /test_enc_version_affected_user1/files/welcome.txt\n
-The file /test_enc_version_affected_user1/files/welcome.txt is: OK\n
 Verifying the content of file /test_enc_version_affected_user1/files/world.txt\n
-Attempting to fix the path: /test_enc_version_affected_user1/files/world.txt\n
-Decrement the encrypted version to 14\n
-Decrement the encrypted version to 13\n
-Decrement the encrypted version to 12\n
-Decrement the encrypted version to 11\n
-Decrement the encrypted version to 10\n
-Decrement the encrypted version to 9\n
 The file /test_enc_version_affected_user1/files/world.txt is: OK\n
-Fixed the file /test_enc_version_affected_user1/files/world.txt with version 9\n

Reference: https://drone.owncloud.com/owncloud/core/16812/127

@mmattel
Copy link
Contributor

mmattel commented Apr 10, 2019

Please tick the Doc-ticket item and add one in docs !
Just for the record, a master forward port needs to be created

@sharidas
Copy link
Contributor Author

Debugging the cause for why the files are not getting encrypted when the test is run. I was able to find that even the skeleton when copied doesn't get encrypted. This is how the directory structure looks after the user logs in:

 sujith@sujith-ownCloud  /tmp/test  ➦ 183c548 ●  tree data
data
├── files_encryption
│   └── OC_DEFAULT_MODULE
│       ├── master_0e0a0c1f.privateKey
│       ├── master_0e0a0c1f.publicKey
│       ├── pubShare_0e0a0c1f.privateKey
│       └── pubShare_0e0a0c1f.publicKey
├── index.html
├── owncloud.log
└── test_enc_version_affected_user1
    ├── cache
    └── files
        └── welcome.txt

5 directories, 7 files
 sujith@sujith-ownCloud  /tmp/test  ➦ 183c548 ● 

$fileCache = $cache->get($fileId);

if ($storage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage')) {
$output->writeln("<info>The file: $path is a share. Hence kindly fix this by running the script under the owner of share</info>");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where you wrote "by running the script under the owner of share", did you mean "by running the script as the owner of share"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant is : executing the script for the user who owns the share.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about: Hence kindly fix this by running the script for the owner of share ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if this looks ok?

Copy link
Contributor

@settermjd settermjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments, all intended to help out. Sorry if they come across as pedantic or nitpicky.

@phil-davis
Copy link
Contributor

phil-davis commented Apr 11, 2019

Note: this is a backport of code already reviewed in the encryption app that is separated from core master - see PR owncloud/encryption#115
So it will be best if the bits-and-pieces of word and minor code changes for the review are kept in a 2nd commit in this PR. That will make it easy to look at that 2nd commit and "forward port" those changes into the encryption app.

@sharidas sharidas force-pushed the fix-encryption-version-command-stable10 branch 4 times, most recently from 34c3ffa to 4af812b Compare April 11, 2019 15:34
@sharidas
Copy link
Contributor Author

There is a final failure noticed with files_primary_s3 for :

1) OCA\Files_Sharing\Tests\WatcherTest::testFolderSizePropagationToOwnerStorage
fread() expects parameter 1 to be resource, boolean given

/drone/src/lib/private/Files/Storage/Wrapper/Encryption.php:893
/drone/src/lib/private/Files/Storage/Wrapper/Encryption.php:967
/drone/src/lib/private/Files/Storage/Wrapper/Encryption.php:379
/drone/src/lib/private/Files/Storage/Wrapper/Encryption.php:231
/drone/src/lib/private/Files/Storage/Wrapper/Checksum.php:191
/drone/src/lib/private/Files/Storage/Wrapper/Jail.php:252
/drone/src/apps/files_sharing/lib/SharedStorage.php:452
/drone/src/apps/files_sharing/tests/WatcherTest.php:113

2) OCA\Files_Sharing\Tests\WatcherTest::testSubFolderSizePropagationToOwnerStorage
fread() expects parameter 1 to be resource, boolean given

/drone/src/lib/private/Files/Storage/Wrapper/Encryption.php:893
/drone/src/lib/private/Files/Storage/Wrapper/Encryption.php:967
/drone/src/lib/private/Files/Storage/Wrapper/Encryption.php:379
/drone/src/lib/private/Files/Storage/Wrapper/Encryption.php:231
/drone/src/lib/private/Files/Storage/Wrapper/Checksum.php:191
/drone/src/lib/private/Files/Storage/Wrapper/Jail.php:252
/drone/src/apps/files_sharing/lib/SharedStorage.php:452
/drone/src/apps/files_sharing/tests/WatcherTest.php:143

The issues related to this PR's test are now passing in the CI.

@phil-davis
Copy link
Contributor

I added TestcCase typo fix "backported" from owncloud/encryption#116

@sharidas sharidas force-pushed the fix-encryption-version-command-stable10 branch from 35361c6 to c7b1fd4 Compare April 12, 2019 11:44
@sharidas
Copy link
Contributor Author

I will create a separate commit in this PR to address the changes requested.

sharidas and others added 2 commits April 12, 2019 17:59
Add a new command to fix the encryption
version. This would help the admin to
fix the issues related to encryption version
mismatch for the files.

Signed-off-by: Sujith H <[email protected]>
@sharidas sharidas force-pushed the fix-encryption-version-command-stable10 branch from c7b1fd4 to f617238 Compare April 12, 2019 12:33
@sharidas
Copy link
Contributor Author

Added commit f617238 to this PR.

Fix minor wording corrections in the command
and in the test.

Signed-off-by: Sujith H <[email protected]>
@sharidas sharidas force-pushed the fix-encryption-version-command-stable10 branch from f617238 to c530242 Compare April 12, 2019 13:26
@sharidas sharidas requested a review from PVince81 April 12, 2019 13:30
Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sharidas
Copy link
Contributor Author

sharidas commented Apr 12, 2019

@PVince81 PVince81 merged commit 6f9fa25 into stable10 Apr 12, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-encryption-version-command-stable10 branch April 12, 2019 14:31
@phil-davis
Copy link
Contributor

This did not seem to make it into the release10.2 branch.

@settermjd
Copy link
Contributor

settermjd commented Aug 6, 2019

I was just going to write something similar. I'm using daily-master to review changes and that command isn't available in 10.3.0 prealpha.

@phil-davis
Copy link
Contributor

phil-davis commented Aug 6, 2019

This code is in the "new" core master branch that is planned to become 10.3 "real soon now".
So the command should be in any of the daily tarballs etc.

@settermjd
Copy link
Contributor

Thanks for the clarification, @phil-davis. Just as soon as it's in one of the Docker releases, I'll get it documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants