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

Add default option 'no' to --continue for command decryptall #32618

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

sharidas
Copy link
Contributor

@sharidas sharidas commented Sep 6, 2018

Add default option 'no' to --continue
option for the command decryptall.

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

Description

Add default option 'no' to the decrypt-all command. So that when user tries ./occ encryption:decrypt-all user1 , it should continue with asking permissions ( the old behaviour ).

Related Issue

Motivation and Context

Add default option 'no' to the decrypt-all command. So that when user tries ./occ encryption:decrypt-all user1 , it should continue with asking permissions ( the old behaviour ).

How Has This Been Tested?

  • setup encryption with masterkey
  • create user user1. Login as user1 and logout.
  • run
➜  owncloud3 git:(master) ✗ ./occ encryption:decrypt-all user1 
Cannot load Xdebug - it was already loaded
Disable server side encryption... done.


You are about to start to decrypt all files stored in user1's account.
It will depend on the encryption module and your setup if this is possible.
Depending on the number and size of your files this can take some time
Please make sure that no user access his files during this process!

Do you really want to continue? (y/n) y
prepare encryption modules...

Prepare "Default encryption module"

Using master key for decryption
 done.


 decrypt files for user user1 (1 of 1): /user1/files/welcome.txt 
 [-->-------------------------]

 starting to decrypt files... finished 
 [============================]


all files could be decrypted successfully!
Server side encryption remains enabled
➜  owncloud3 git:(master) ✗
  • Verified the same with user-keys encryption
➜  owncloud3 git:(add-default-option-decrypt-all) ✗ ./occ encryption:decrypt-all user1                          
Cannot load Xdebug - it was already loaded
Disable server side encryption... done.


You are about to start to decrypt all files stored in user1's account.
It will depend on the encryption module and your setup if this is possible.
Depending on the number and size of your files this can take some time
Please make sure that no user access his files during this process!

Do you really want to continue? (y/n) y
prepare encryption modules...
 done.


 starting to decrypt files... 
 [->--------------------------]
Prepare "Default encryption module"

Configuring encryption module for decryption with user based keys
 decrypt files for user user1 (1 of 1): /user1/files/welcome.txt 
 [-->-------------------------]

 starting to decrypt files... finished 
 [============================]


all files could be decrypted successfully!
Server side encryption remains enabled
➜  owncloud3 git:(add-default-option-decrypt-all) ✗ 
  • Verified that it doesn't break option -c yes for both masterkey and user-keys

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

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)

Add default option 'no' to --continue
option for the command decryptall.

Signed-off-by: Sujith H <[email protected]>
@sharidas sharidas added this to the development milestone Sep 6, 2018
@sharidas sharidas self-assigned this Sep 6, 2018
@codecov
Copy link

codecov bot commented Sep 6, 2018

Codecov Report

Merging #32618 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #32618      +/-   ##
============================================
+ Coverage     64.14%   64.14%   +<.01%     
  Complexity    18681    18681              
============================================
  Files          1177     1177              
  Lines         70283    70284       +1     
  Branches       1270     1270              
============================================
+ Hits          45085    45086       +1     
  Misses        24828    24828              
  Partials        370      370
Flag Coverage Δ Complexity Δ
#javascript 52.89% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.42% <100%> (ø) 18681 <0> (ø) ⬇️
Impacted Files Coverage Δ Complexity Δ
core/Command/Encryption/DecryptAll.php 95% <100%> (+0.06%) 15 <0> (ø) ⬇️

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 d2551ab...7179c0e. Read the comment docs.

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.

👍

@PVince81
Copy link
Contributor

please backport, I think we should have this in 10.0.10 as the new behavior is a regression and surprise for admins as the default behaves differently without this change

@PVince81 PVince81 merged commit 1c774dc into master Sep 11, 2018
@PVince81 PVince81 deleted the add-default-option-decrypt-all branch September 11, 2018 16:14
@sharidas
Copy link
Contributor Author

Backport to stabl10 : #32677

@lock lock bot locked as resolved and limited conversation to collaborators Sep 11, 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.

Decrypt all is forcing continue option, should default to no
2 participants