// otherwise we perform a stream copy, so we get a new set of keys\r
$mp1 = $view->getMountPoint('/' . $user . '/files/' . $params['oldpath']);\r
$mp2 = $view->getMountPoint('/' . $user . '/files/' . $params['newpath']);\r
- list($storage1, ) = Filesystem::resolvePath($params['oldpath']);\r
\r
if ($mp1 === $mp2) {\r
self::$renamedFiles[$params['oldpath']] = array(\r
*/
$(document).ready(function(){
- // Trigger ajax on recoveryAdmin status change
- var enabledStatus = $('#adminEnableRecovery').val();
$('input:password[name="encryptionRecoveryPassword"]').keyup(function(event) {
var recoveryPassword = $( '#encryptionRecoveryPassword' ).val();
'Could not delete shareKey; does not exist: "' . $ma . '"', \OCP\Util::ERROR);
}
}
- $subdirs = $directories = glob($escapedDir . '/*', GLOB_ONLYDIR);
+ $subdirs = glob($escapedDir . '/*', GLOB_ONLYDIR);
foreach ($subdirs as $subdir) {
self::recursiveDelShareKeys($subdir, $userIds);
}
$this->assertTrue($util->isEncryptedPath($this->userId . '/files/' . $encryptedFile));
// cleanup
- $this->view->unlink($this->userId . '/files/' . $unencryptedFile, $this->dataShort);
- $this->view->unlink($this->userId . '/files/' . $encryptedFile, $this->dataShort);
+ $this->view->unlink($this->userId . '/files/' . $unencryptedFile);
+ $this->view->unlink($this->userId . '/files/' . $encryptedFile);
}
$datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data/');
$userdir = $datadir . '/' . $this->userId . '/files/';
- $util = new Encryption\Util($this->view, $this->userId);
-
$this->view->file_put_contents($this->userId . '/files/' . $filename, $this->dataShort);
$fileInfoEncrypted = $this->view->getFileInfo($this->userId . '/files/' . $filename);
$this->userId . '/files_encryption/keyfiles/' . $file1 . '.key.moved');
// decrypt all encrypted files
- $result = $util->decryptAll('/' . $this->userId . '/' . 'files');
+ $result = $util->decryptAll();
$this->assertFalse($result);
$this->userId . '/files_encryption/keyfiles/' . $file1 . '.key');
// try again to decrypt all encrypted files
- $result = $util->decryptAll('/' . $this->userId . '/' . 'files');
+ $result = $util->decryptAll();
$this->assertTrue($result);
// init filesystem view
$this->view = new \OC\Files\View('/');
- list($this->storage, $intPath) = $this->view->resolvePath('/');
+ list($this->storage, ) = $this->view->resolvePath('/');
// init short data
$this->dataShort = 'hats';
$sharingEnabled = \OCP\Share::isEnabled();
// get users sharing this file
- $usersSharing = $util->getSharingUsersArray($sharingEnabled, $target, $user);
+ $usersSharing = $util->getSharingUsersArray($sharingEnabled, $target);
// Attempt to set shareKey
$util->setSharedFileKeyfiles($session, $usersSharing, $target);