Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 6 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -766,14 +766,19 @@ private function getDownloadedFilePath(): string {
*
* @throws \Exception
*/
public function verifyIntegrity(): void {
public function verifyIntegrity(string $urlOverride = ''): void {
$this->silentLog('[info] verifyIntegrity()');

if ($this->getCurrentReleaseChannel() === 'daily') {
$this->silentLog('[info] current channel is "daily" which is not signed. Skipping verification.');
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');
Expand Down
2 changes: 1 addition & 1 deletion lib/UpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 6 additions & 1 deletion lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -749,14 +749,19 @@ private function getDownloadedFilePath(): string {
*
* @throws \Exception
*/
public function verifyIntegrity(): void {
public function verifyIntegrity(string $urlOverride = ''): void {
$this->silentLog('[info] verifyIntegrity()');

if ($this->getCurrentReleaseChannel() === 'daily') {
$this->silentLog('[info] current channel is "daily" which is not signed. Skipping verification.');
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');
Expand Down
Binary file modified updater.phar
Binary file not shown.
Loading