diff --git a/index.php b/index.php index c34fc5c6..4ef249bf 100644 --- a/index.php +++ b/index.php @@ -766,7 +766,7 @@ private function getDownloadedFilePath(): string { * * @throws \Exception */ - public function verifyIntegrity(): void { + public function verifyIntegrity(string $urlOverride = ''): void { $this->silentLog('[info] verifyIntegrity()'); if ($this->getCurrentReleaseChannel() === 'daily') { @@ -774,6 +774,11 @@ public function verifyIntegrity(): void { return; } + if ($urlOverride !== '') { + $this->silentLog('[info] custom download url provided, cannot verify signature'); + return; + } + $response = $this->getUpdateServerResponse(); if (empty($response['signature'])) { throw new \Exception('No signature specified for defined update'); diff --git a/lib/UpdateCommand.php b/lib/UpdateCommand.php index c7a26e26..0596418c 100644 --- a/lib/UpdateCommand.php +++ b/lib/UpdateCommand.php @@ -420,7 +420,7 @@ protected function executeStep(int $step): array { $this->updater->silentLog('[info] Skipping integrity check as requested'); break; } - $this->updater->verifyIntegrity(); + $this->updater->verifyIntegrity($this->urlOverride); break; case 6: $this->updater->extractDownload(); diff --git a/lib/Updater.php b/lib/Updater.php index 83b60513..e2b96721 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -749,7 +749,7 @@ private function getDownloadedFilePath(): string { * * @throws \Exception */ - public function verifyIntegrity(): void { + public function verifyIntegrity(string $urlOverride = ''): void { $this->silentLog('[info] verifyIntegrity()'); if ($this->getCurrentReleaseChannel() === 'daily') { @@ -757,6 +757,11 @@ public function verifyIntegrity(): void { return; } + if ($urlOverride !== '') { + $this->silentLog('[info] custom download url provided, cannot verify signature'); + return; + } + $response = $this->getUpdateServerResponse(); if (empty($response['signature'])) { throw new \Exception('No signature specified for defined update'); diff --git a/updater.phar b/updater.phar index f6a1f75c..af7d0dad 100755 Binary files a/updater.phar and b/updater.phar differ