You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ php updater.phar
Nextcloud Updater - version: v16.0.3-3-ga0c2b25 dirty
Current version is 18.0.9.
Update to Nextcloud 19.0.3 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-19.0.3.zip
Open changelog ↗
Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done
Start update? [y/N] y
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✘] Verify integrity failed
Not exact 3 files existent in folder
Update failed. To resume or retry just execute the updater again.
thrownew \Exception('Not exact 3 files existent in folder');
}
return$storageLocation . '/' . $files[2];
}
This function assumes that a scandir always includes . and .. (and that they are the first and second entry in a scandir). This assumption is wrong. The data folder of this particular Nextcloud installation is on a FUSE filesystem (more exactly, it's S3QL). This filesystem does not return . and .. in a scandir call. Also . and .. could be on different positions in the array, so unconditionally accessing the third entry is wrong, too.
Trying to execute the updater I get
The error is thrown here:
updater/lib/Updater.php
Lines 576 to 586 in cbf2b53
updater/index.php
Lines 693 to 703 in cbf2b53
This function assumes that a
scandir
always includes.
and..
(and that they are the first and second entry in ascandir
). This assumption is wrong. The data folder of this particular Nextcloud installation is on a FUSE filesystem (more exactly, it's S3QL). This filesystem does not return.
and..
in ascandir
call. Also.
and..
could be on different positions in the array, so unconditionally accessing the third entry is wrong, too.Something like this should handle these cases:
The text was updated successfully, but these errors were encountered: