Skip to content

Commit c1b9d05

Browse files
authored
Merge pull request #743 from nextcloud/backport/741/stable32
2 parents e4a5a8e + 6097fab commit c1b9d05

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

index.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,14 +766,19 @@ private function getDownloadedFilePath(): string {
766766
*
767767
* @throws \Exception
768768
*/
769-
public function verifyIntegrity(): void {
769+
public function verifyIntegrity(string $urlOverride = ''): void {
770770
$this->silentLog('[info] verifyIntegrity()');
771771

772772
if ($this->getCurrentReleaseChannel() === 'daily') {
773773
$this->silentLog('[info] current channel is "daily" which is not signed. Skipping verification.');
774774
return;
775775
}
776776

777+
if ($urlOverride !== '') {
778+
$this->silentLog('[info] custom download url provided, cannot verify signature');
779+
return;
780+
}
781+
777782
$response = $this->getUpdateServerResponse();
778783
if (empty($response['signature'])) {
779784
throw new \Exception('No signature specified for defined update');

lib/UpdateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ protected function executeStep(int $step): array {
420420
$this->updater->silentLog('[info] Skipping integrity check as requested');
421421
break;
422422
}
423-
$this->updater->verifyIntegrity();
423+
$this->updater->verifyIntegrity($this->urlOverride);
424424
break;
425425
case 6:
426426
$this->updater->extractDownload();

lib/Updater.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,14 +749,19 @@ private function getDownloadedFilePath(): string {
749749
*
750750
* @throws \Exception
751751
*/
752-
public function verifyIntegrity(): void {
752+
public function verifyIntegrity(string $urlOverride = ''): void {
753753
$this->silentLog('[info] verifyIntegrity()');
754754

755755
if ($this->getCurrentReleaseChannel() === 'daily') {
756756
$this->silentLog('[info] current channel is "daily" which is not signed. Skipping verification.');
757757
return;
758758
}
759759

760+
if ($urlOverride !== '') {
761+
$this->silentLog('[info] custom download url provided, cannot verify signature');
762+
return;
763+
}
764+
760765
$response = $this->getUpdateServerResponse();
761766
if (empty($response['signature'])) {
762767
throw new \Exception('No signature specified for defined update');

updater.phar

169 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)