Skip to content

Commit a8c857b

Browse files
authored
Merge pull request #744 from nextcloud/backport/741/stable33
2 parents d6e9087 + 46abee4 commit a8c857b

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
@@ -830,14 +830,19 @@ private function getDownloadedFilePath(): string {
830830
*
831831
* @throws \Exception
832832
*/
833-
public function verifyIntegrity(): void {
833+
public function verifyIntegrity(string $urlOverride = ''): void {
834834
$this->silentLog('[info] verifyIntegrity()');
835835

836836
if ($this->getCurrentReleaseChannel() === 'daily') {
837837
$this->silentLog('[info] current channel is "daily" which is not signed. Skipping verification.');
838838
return;
839839
}
840840

841+
if ($urlOverride !== '') {
842+
$this->silentLog('[info] custom download url provided, cannot verify signature');
843+
return;
844+
}
845+
841846
$response = $this->getUpdateServerResponse();
842847
if (empty($response['signature'])) {
843848
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
@@ -463,7 +463,7 @@ protected function executeStep(int $step, OutputInterface $output): array {
463463
$this->updater->silentLog('[info] Skipping integrity check as requested');
464464
break;
465465
}
466-
$this->updater->verifyIntegrity();
466+
$this->updater->verifyIntegrity($this->urlOverride);
467467
break;
468468
case 6:
469469
$this->updater->extractDownload();

lib/Updater.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,14 +814,19 @@ private function getDownloadedFilePath(): string {
814814
*
815815
* @throws \Exception
816816
*/
817-
public function verifyIntegrity(): void {
817+
public function verifyIntegrity(string $urlOverride = ''): void {
818818
$this->silentLog('[info] verifyIntegrity()');
819819

820820
if ($this->getCurrentReleaseChannel() === 'daily') {
821821
$this->silentLog('[info] current channel is "daily" which is not signed. Skipping verification.');
822822
return;
823823
}
824824

825+
if ($urlOverride !== '') {
826+
$this->silentLog('[info] custom download url provided, cannot verify signature');
827+
return;
828+
}
829+
825830
$response = $this->getUpdateServerResponse();
826831
if (empty($response['signature'])) {
827832
throw new \Exception('No signature specified for defined update');

updater.phar

-3.32 KB
Binary file not shown.

0 commit comments

Comments
 (0)