Skip to content

[stable12] Add recovery key on public upload - #5630

Merged
schiessle merged 2 commits into
stable12from
add-recovery-key-on-public-upload-stable12
Jul 20, 2017
Merged

schiessle merged 2 commits into
stable12from
add-recovery-key-on-public-upload-stable12

Conversation

@schiessle

Copy link
Copy Markdown
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

@nickvergessen nickvergessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works

}

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

codecov Bot commented Jul 17, 2017 •

Copy link
Copy Markdown

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

@blizzz blizzz left a comment

Copy link
Copy Markdown
Member

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 <bjoern@schiessle.org>
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
@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