diff --git a/index.php b/index.php index 2743ff75..80c8281b 100644 --- a/index.php +++ b/index.php @@ -758,7 +758,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') { @@ -766,6 +766,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 5fecddfc..efb78842 100644 --- a/lib/UpdateCommand.php +++ b/lib/UpdateCommand.php @@ -385,7 +385,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 be40d1ab..b1d051a6 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -720,7 +720,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') { @@ -728,6 +728,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 ebf72347..2d2090ba 100755 Binary files a/updater.phar and b/updater.phar differ