Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix(lookup-server): do not upload data by default
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Mar 11, 2025
commit 5e4910e10e05512f8339edc8a2252566a01dffba
2 changes: 1 addition & 1 deletion apps/federatedfilesharing/lib/FederatedShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ public function isLookupServerUploadEnabled(): bool {
if ($this->gsConfig->isGlobalScaleEnabled()) {
return false;
}
$result = $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes');
$result = $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no');
return $result === 'yes';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ public function testIsLookupServerUploadEnabled($gsEnabled, $isEnabled, $expecte
$this->gsConfig->expects($this->once())->method('isGlobalScaleEnabled')
->willReturn($gsEnabled);
$this->config->expects($this->any())->method('getAppValue')
->with('files_sharing', 'lookupServerUploadEnabled', 'yes')
->with('files_sharing', 'lookupServerUploadEnabled', 'no')
->willReturn($isEnabled);

$this->assertSame($expected,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function start(IJobList $jobList): void {
protected function shouldRemoveBackgroundJob(): bool {
return $this->config->getSystemValueBool('has_internet_connection', true) === false ||
$this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') === '' ||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') !== 'yes' ||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no') !== 'yes' ||
$this->retries >= 5;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/lookup_server_connector/lib/UpdateLookupServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function userUpdated(IUser $user): void {
*/
private function shouldUpdateLookupServer(): bool {
return $this->config->getSystemValueBool('has_internet_connection', true) === true &&
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') === 'yes' &&
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no') === 'yes' &&
$this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') !== '';
}
}
2 changes: 1 addition & 1 deletion apps/settings/lib/BackgroundJobs/VerifyUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected function verifyWebsite(array $argument) {

protected function verifyViaLookupServer(array $argument, string $dataType): bool {
if (empty($this->lookupServerUrl) ||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') !== 'yes' ||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no') !== 'yes' ||
$this->config->getSystemValue('has_internet_connection', true) === false) {
return true;
}
Expand Down