From 38f4a604d8bff4506cff5e3f7ae1614ad087d37c Mon Sep 17 00:00:00 2001 From: memurats Date: Thu, 19 Feb 2026 17:03:10 +0100 Subject: [PATCH 1/3] force disable e2eeInBrowserEnabled --- lib/Controller/ConfigController.php | 5 +++++ lib/Listener/LoadAdditionalListener.php | 2 +- lib/Settings/Personal.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Controller/ConfigController.php b/lib/Controller/ConfigController.php index 84a4712ff..e9f0ebdd8 100644 --- a/lib/Controller/ConfigController.php +++ b/lib/Controller/ConfigController.php @@ -38,6 +38,11 @@ public function setUserConfig(string $key, string $value): JSONResponse { return new JSONResponse([], Http::STATUS_PRECONDITION_FAILED); } + // force disable e2eeInBrowserEnabled + if ($key === 'e2eeInBrowserEnabled') { + $value = 'false'; + } + $this->config->setUserValue($this->userId, Application::APP_ID, $key, $value); return new JSONResponse([], Http::STATUS_OK); } diff --git a/lib/Listener/LoadAdditionalListener.php b/lib/Listener/LoadAdditionalListener.php index f66932667..bf5ed5cea 100644 --- a/lib/Listener/LoadAdditionalListener.php +++ b/lib/Listener/LoadAdditionalListener.php @@ -36,7 +36,7 @@ public function handle(Event $event): void { $this->initialState->provideInitialState( 'userConfig', [ - 'e2eeInBrowserEnabled' => $this->config->getUserValue($this->userId, 'end_to_end_encryption', 'e2eeInBrowserEnabled', 'false') === 'true', + 'e2eeInBrowserEnabled' => false, ] ); diff --git a/lib/Settings/Personal.php b/lib/Settings/Personal.php index 66246a72f..f968475e3 100644 --- a/lib/Settings/Personal.php +++ b/lib/Settings/Personal.php @@ -39,7 +39,7 @@ public function getForm(): TemplateResponse { $this->initialState->provideInitialState( 'userConfig', [ - 'e2eeInBrowserEnabled' => $this->config->getUserValue($this->userId, 'end_to_end_encryption', 'e2eeInBrowserEnabled', 'false') === 'true', + 'e2eeInBrowserEnabled' => false, ] ); From ed997ebebf9723cc4c6cb1040b0b76ad0c64cdb8 Mon Sep 17 00:00:00 2001 From: memurats Date: Mon, 23 Feb 2026 14:20:56 +0100 Subject: [PATCH 2/3] fixed some issues --- lib/Connector/Sabre/PropFindPlugin.php | 18 ++++++++++++++++-- lib/MetaDataStorage.php | 15 +++++++++++---- src/components/MnemonicPromptDialog.vue | 2 +- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/lib/Connector/Sabre/PropFindPlugin.php b/lib/Connector/Sabre/PropFindPlugin.php index 66c0565ff..f4a851a31 100644 --- a/lib/Connector/Sabre/PropFindPlugin.php +++ b/lib/Connector/Sabre/PropFindPlugin.php @@ -66,17 +66,31 @@ public function setE2EEProperties(PropFind $propFind, \Sabre\DAV\INode $node) { }); $propFind->handle(self::E2EE_METADATA_PROPERTYNAME, function () use ($node) { - if ($this->isE2EEnabledPath($node)) { + if (!$this->isE2EEnabledPath($node)) { + return null; + } + + try { return $this->metaDataStorage->getMetaData( $this->userSession->getUser()->getUID(), $node->getId(), ); + } catch (\Throwable $e) { + // Missing metadata must not break PROPFIND (avoid 500) + return null; } }); $propFind->handle(self::E2EE_METADATA_SIGNATURE_PROPERTYNAME, function () use ($node) { - if ($this->isE2EEnabledPath($node)) { + if (!$this->isE2EEnabledPath($node)) { + return null; + } + + try { return $this->metaDataStorage->readSignature($node->getId()); + } catch (\Throwable $e) { + // Missing signature/metadata must not break PROPFIND (avoid 500) + return null; } }); } diff --git a/lib/MetaDataStorage.php b/lib/MetaDataStorage.php index a1206f493..b544ba4b8 100644 --- a/lib/MetaDataStorage.php +++ b/lib/MetaDataStorage.php @@ -53,11 +53,18 @@ public function getMetaData(string $userId, int $id): string { } $folderName = $this->getFolderNameForFileId($id); - $folder = $this->appData->getFolder($folderName); - return $folder - ->getFile($this->metaDataFileName) - ->getContent(); + try { + $folder = $this->appData->getFolder($folderName); + } catch (NotFoundException $e) { + throw new MissingMetaDataException('Meta-data folder missing'); + } + + try { + return $folder->getFile($this->metaDataFileName)->getContent(); + } catch (NotFoundException $e) { + throw new MissingMetaDataException('Meta-data file missing'); + } } /** diff --git a/src/components/MnemonicPromptDialog.vue b/src/components/MnemonicPromptDialog.vue index 15e36107a..14ceb7d60 100644 --- a/src/components/MnemonicPromptDialog.vue +++ b/src/components/MnemonicPromptDialog.vue @@ -30,7 +30,7 @@ function submit() { const buttons = computed(() => [ { - label: t('end_to_en_encryption', 'Submit'), + label: t('end_to_end_encryption', 'Submit'), nativeType: 'submit', type: 'primary', disabled: !isFormValid.value, From 394c89d67ae0af94ea29a2f3bb1b35c8ffbc1f02 Mon Sep 17 00:00:00 2001 From: memurats Date: Mon, 23 Feb 2026 16:05:28 +0100 Subject: [PATCH 3/3] disable button --- src/components/SecuritySection.vue | 63 +++++++++++++++--------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/src/components/SecuritySection.vue b/src/components/SecuritySection.vue index 4a13b6d9e..1e3c5996b 100644 --- a/src/components/SecuritySection.vue +++ b/src/components/SecuritySection.vue @@ -6,40 +6,41 @@