@@ -21,6 +21,7 @@ class UpdateCommand extends Command {
2121 protected bool $ shouldStop = false ;
2222 protected bool $ skipBackup = false ;
2323 protected bool $ skipUpgrade = false ;
24+ protected bool $ skipIntegrityCheck = false ;
2425 protected string $ urlOverride = '' ;
2526
2627 /** @var list<string> strings of text for stages of updater */
@@ -47,7 +48,8 @@ protected function configure(): void {
4748 ->setHelp ("This command fetches the latest code that is announced via the updater server and safely replaces the existing code with the new one. " )
4849 ->addOption ('no-backup ' , null , InputOption::VALUE_NONE , 'Skip backup of current Nextcloud version ' )
4950 ->addOption ('no-upgrade ' , null , InputOption::VALUE_NONE , "Don't automatically run occ upgrade " )
50- ->addOption ('url ' , null , InputOption::VALUE_OPTIONAL , 'The URL of the Nextcloud release to download ' );
51+ ->addOption ('url ' , null , InputOption::VALUE_OPTIONAL , 'The URL of the Nextcloud release to download ' )
52+ ->addOption ('no-verify ' , null , InputOption::VALUE_OPTIONAL , 'Skip integrity verification of the downloaded file ' );
5153 }
5254
5355 public static function getUpdaterVersion (): string {
@@ -62,6 +64,7 @@ public static function getUpdaterVersion(): string {
6264 protected function execute (InputInterface $ input , OutputInterface $ output ) {
6365 $ this ->skipBackup = (bool )$ input ->getOption ('no-backup ' );
6466 $ this ->skipUpgrade = (bool )$ input ->getOption ('no-upgrade ' );
67+ $ this ->skipIntegrityCheck = (bool )$ input ->getOption ('no-verify ' );
6568 $ this ->urlOverride = (string )$ input ->getOption ('url ' );
6669
6770 $ version = static ::getUpdaterVersion ();
@@ -143,6 +146,11 @@ protected function execute(InputInterface $input, OutputInterface $output) {
143146 $ updateString = $ this ->updater ->checkForUpdate ();
144147 }
145148
149+ if ($ this ->skipIntegrityCheck ) {
150+ $ this ->updater ->log ('[warn] Integrity check of the downloaded file will be skipped ' );
151+ $ output ->writeln ('Integrity check of the downloaded file will be skipped. ' );
152+ }
153+
146154 $ output ->writeln ('' );
147155
148156 $ lines = explode ('<br /> ' , $ updateString );
@@ -373,7 +381,11 @@ protected function executeStep(int $step): array {
373381 $ this ->updater ->downloadUpdate ($ this ->urlOverride );
374382 break ;
375383 case 5 :
376- $ this ->updater ->verifyIntegrity ($ this ->urlOverride );
384+ if ($ this ->skipIntegrityCheck ) {
385+ $ this ->updater ->silentLog ('[info] Skipping integrity check as requested ' );
386+ break ;
387+ }
388+ $ this ->updater ->verifyIntegrity ();
377389 break ;
378390 case 6 :
379391 $ this ->updater ->extractDownload ();
0 commit comments