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

occ files:checksum:verify throws exception with user-key encryption #182

Open
phil-davis opened this issue Feb 20, 2020 · 0 comments
Open

Comments

@phil-davis
Copy link
Contributor

https://drone.owncloud.com/owncloud/encryption/1128/90/11

Feature: files checksum command

  Scenario: Administrator verifies the checksum of all the files       # /var/www/owncloud/testrunner/tests/acceptance/features/cliMain/filesChecksum.feature:4
    When the administrator invokes occ command "files:checksum:verify" # OccContext::theAdministratorInvokesOccCommand()
    Then the command should have been successful                       # OccContext::theCommandShouldHaveBeenSuccessful()
      The command was not successful, exit code was 1.
      stdOut was: 'This operation might take quite some time.
      Starting to verify checksums for admin
      '
      stdErr was: '
      In Encryption.php line 359:
                                                                                     
        Can not decrypt this file, probably this is a shared file. Please ask the f  
        ile owner to reshare the file with you.                                      
                                                                                     
      
      files:checksums:verify [-r|--repair] [-u|--user USER] [-p|--path PATH]
      
      '
       (Exception)

  Scenario: Administrator fixes the mismatched checksums                  # /var/www/owncloud/testrunner/tests/acceptance/features/cliMain/filesChecksum.feature:8
    When the administrator invokes occ command "files:checksum:verify -r" # OccContext::theAdministratorInvokesOccCommand()
    Then the command should have been successful                          # OccContext::theCommandShouldHaveBeenSuccessful()
      The command was not successful, exit code was 1.
      stdOut was: 'This operation might take quite some time.
      Starting to verify checksums for admin
      '
      stdErr was: '
      In Encryption.php line 359:
                                                                                     
        Can not decrypt this file, probably this is a shared file. Please ask the f  
        ile owner to reshare the file with you.                                      
                                                                                     
      
      files:checksums:verify [-r|--repair] [-u|--user USER] [-p|--path PATH]
      
      '
       (Exception)

  Scenario: Administrator verifies the checksum of all the files of a user          # /var/www/owncloud/testrunner/tests/acceptance/features/cliMain/filesChecksum.feature:12
    Given user "user0" has been created with default attributes and skeleton files  # FeatureContext::userHasBeenCreatedWithDefaultAttributes()
    When the administrator invokes occ command "files:checksum:verify --user=user0" # OccContext::theAdministratorInvokesOccCommand()
    Then the command should have been successful                                    # OccContext::theCommandShouldHaveBeenSuccessful()
      The command was not successful, exit code was 1.
      stdOut was: 'Starting to verify checksums for user0
      '
      stdErr was: '
      In Encryption.php line 359:
                                                                                     
        Can not decrypt this file, probably this is a shared file. Please ask the f  
        ile owner to reshare the file with you.                                      
                                                                                     
      
      files:checksums:verify [-r|--repair] [-u|--user USER] [-p|--path PATH]
      
      '
       (Exception)

  Scenario: Administrator fixes the mismatched checksums of all the files of a user    # /var/www/owncloud/testrunner/tests/acceptance/features/cliMain/filesChecksum.feature:17
    Given user "user0" has been created with default attributes and skeleton files     # FeatureContext::userHasBeenCreatedWithDefaultAttributes()
    When the administrator invokes occ command "files:checksum:verify -r --user=user0" # OccContext::theAdministratorInvokesOccCommand()
    Then the command should have been successful                                       # OccContext::theCommandShouldHaveBeenSuccessful()
      The command was not successful, exit code was 1.
      stdOut was: 'Starting to verify checksums for user0
      '
      stdErr was: '
      In Encryption.php line 359:
                                                                                     
        Can not decrypt this file, probably this is a shared file. Please ask the f  
        ile owner to reshare the file with you.                                      
                                                                                     
      
      files:checksums:verify [-r|--repair] [-u|--user USER] [-p|--path PATH]
      
      '
       (Exception)

These scenarios pass with masterkey encryption.

I guess that the command has no chance to work because it does not have access to the necessary user key for the user. But it could give a nicer message saying that it cannot do checksum:verify with user-key encryption.

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

No branches or pull requests

1 participant