Bjoern Voigt wrote:
> I found 3 main problems here:
>
>  1. Master key creation was delayed until encryption itself was started.
>     For me it's also unclear why a separate key pair was created for
>     each user anyway (see logs).
>  2. The created encryption passwords for each user were not shown. I
>     think they were shown after the encryption process. But this is too
>     late in case of errors or interrupts. All users except the admin
>     user were authenticated with user_external app. Files for users are
>     probably lost (in this test only fortunately).
>  3.  The encryption process stops after some minutes with locking errors.
For problem 2 I probably found a solution. The password output comes too
late, if the encryption process stops with an error.

The original code for Owncloud 9.0.4 daily9 looks like this:

apps/encryption/lib/crypto/encryptall.php:

        public function encryptAll(InputInterface $input,
OutputInterface $output) {

                $this->input = $input;
                $this->output = $output;

                $headline = 'Encrypt all files with the ' .
Encryption::DISPLAY_NAME;
                $this->output->writeln("\n");
                $this->output->writeln($headline);
                $this->output->writeln(str_pad('', strlen($headline), '='));

                //create private/public keys for each user and store the
private key password
                $this->output->writeln("\n");
                $this->output->writeln('Create key-pair for every user');
                $this->output->writeln('------------------------------');
                $this->output->writeln('');
                $this->output->writeln('This module will encrypt all
files in the users files folder initially.');
                $this->output->writeln('Already existing versions and
files in the trash bin will not be encrypted.');
                $this->output->writeln('');
                $this->createKeyPairs();

                //setup users file system and encrypt all files one by
one (take should encrypt setting of storage into account)
                $this->output->writeln("\n");
                $this->output->writeln('Start to encrypt users files');
                $this->output->writeln('----------------------------');
                $this->output->writeln('');
                $this->encryptAllUsersFiles();
                //send-out or display password list and write it to a file
                $this->output->writeln("\n");
                $this->output->writeln('Generated encryption key
passwords');
               
$this->output->writeln('----------------------------------');
                $this->output->writeln('');
                $this->outputPasswords();
                $this->output->writeln("\n");
        }
I can chance to order of the sections "Start to encrypt users files" and
"Generated encryption key passwords".

I will write a bug report about this.

What is the best strategy for Owncloud bug reports?

  * Bug report only
  * Bug report and pull request
  * which branch?

Greetings,
Björn

_______________________________________________
User mailing list
[email protected]
http://mailman.owncloud.org/mailman/listinfo/user

Reply via email to