Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog/unreleased/36921
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: It's not possible to download externally encrypted files

Downloading was failing with the message "Encryption not ready: Module
with id: OC_DEFAULT_MODULE does not exist." if the file was encrypted
with another ownCloud instance.

https://github.com/owncloud/core/pull/36921
7 changes: 5 additions & 2 deletions lib/private/Files/Storage/Wrapper/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,11 @@ public function fopen($path, $mode) {
// specified in the file header - otherwise we need to fail hard to
// prevent data loss on client side
if (!empty($encryptionModuleId)) {
$targetIsEncrypted = true;
$encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId);
$data = $this->storage->getCache()->get($path);
if (isset($data['encrypted']) && $data['encrypted'] === true) {
$targetIsEncrypted = true;
$encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId);
}
}

if ($this->file_exists($path)) {
Expand Down
Loading