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

[stable12] Add recovery key on public upload #5630

Merged
merged 2 commits into from
Jul 20, 2017

Conversation

schiessle
Copy link
Member

In order to decide if a recovery key needs to be added we always
need to check the files owner settings and not the settings of
the currently logged in user.

backport of #5629

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

Works

@@ -407,7 +413,7 @@ public function update($path, $uid, array $accessList) {
}
}

$publicKeys = $this->keyManager->addSystemKeys($accessList, $publicKeys, $uid);
$publicKeys = $this->keyManager->addSystemKeys($accessList, $publicKeys, $this->owner);
Copy link
Member

Choose a reason for hiding this comment

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

I assumed it is ensured somehow that begin() is run first, and this $this->owner is never null?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, I will double check

Copy link
Member Author

Choose a reason for hiding this comment

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

@blizzz I added a explicit check, can you review it (also the stable11 and master version) Thanks!

@schiessle schiessle force-pushed the add-recovery-key-on-public-upload-stable12 branch from b08c7df to 9cc81d4 Compare July 17, 2017 13:57
@codecov
Copy link

codecov bot commented Jul 17, 2017

Codecov Report

Merging #5630 into stable12 will decrease coverage by 14.71%.
The diff coverage is 85.71%.

@@               Coverage Diff               @@
##             stable12    #5630       +/-   ##
===============================================
- Coverage       54.08%   39.37%   -14.72%     
+ Complexity      22443    21168     -1275     
===============================================
  Files            1380     1311       -69     
  Lines           85825    70847    -14978     
  Branches         1329        0     -1329     
===============================================
- Hits            46416    27893    -18523     
- Misses          39409    42954     +3545
Impacted Files Coverage Δ Complexity Δ
apps/encryption/lib/Crypto/Encryption.php 61.3% <85.71%> (-22.13%) 57 <2> (+2)
.../Exceptions/EncryptionHeaderKeyExistsException.php 0% <0%> (-100%) 1% <0%> (ø)
lib/public/AppFramework/Middleware.php 0% <0%> (-100%) 4% <0%> (ø)
lib/private/Template/ResourceNotFoundException.php 0% <0%> (-100%) 2% <0%> (ø)
apps/dav/lib/CalDAV/Activity/Setting/Calendar.php 0% <0%> (-100%) 8% <0%> (ø)
apps/files/lib/Activity/Settings/FileRestored.php 0% <0%> (-100%) 8% <0%> (ø)
...curity/Exceptions/StrictCookieMissingException.php 0% <0%> (-100%) 1% <0%> (ø)
...te/Authentication/Token/DefaultTokenCleanupJob.php 0% <0%> (-100%) 1% <0%> (ø)
core/Command/Background/WebCron.php 0% <0%> (-100%) 1% <0%> (ø)
...Check/Iterator/ExcludeFileByNameFilterIterator.php 0% <0%> (-100%) 2% <0%> (ø)
... and 730 more

Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

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

Looks good

In order to decide if a recovery key needs to be added we always
need to check the files owner settings and not the settings of
the currently logged in user.

Signed-off-by: Bjoern Schiessle <[email protected]>
@schiessle schiessle force-pushed the add-recovery-key-on-public-upload-stable12 branch from 9cc81d4 to fff804c Compare July 20, 2017 09:44
@schiessle schiessle merged commit c9624d2 into stable12 Jul 20, 2017
@schiessle schiessle deleted the add-recovery-key-on-public-upload-stable12 branch July 20, 2017 12:28
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.

3 participants