Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-04use the same cached propfind for free space for dav storagefed-performanceRobin Appelman
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-29Merge pull request #31632 from Maaxxs/fix-undefined-index-davLouis
Fixes the undefined index error with the DAV property getlastmodified
2022-03-28Use the null coalescing operator to set the value of `size`.Max Kunzelmann
Signed-off-by: Max Kunzelmann <maxdev@posteo.de>
2022-03-24Fixing psalm errorsCôme Chilliet
Encryption constructor is problematic and should still be fixed later. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-23Set `mtime` to null instead of false if `getlastmodified` does not exist.Max Kunzelmann
Signed-off-by: Max Kunzelmann <maxdev@posteo.de>
2022-03-20Fix typo.Max Kunzelmann
Signed-off-by: Max Kunzelmann <maxdev@posteo.de>
2022-03-20Fixes the undefined index error with the DAV property getlastmodifiedMax Kunzelmann
Signed-off-by: Max Kunzelmann <maxdev@posteo.de>
2022-03-18some file scanner performance improvementsRobin Appelman
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-01-25Remove redundant if clauseCôme Chilliet
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-25Fix OC\Files\Storage\DAV::hasUpdated when cache is not setCôme Chilliet
Fixes the test OCA\Files_External\Tests\Storage\WebdavTest::testStat on PHP>=7.4 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14Merge pull request #30631 from nextcloud/fix/update_encrypted_versionVincent Petry
updateEncryptedVersion: cleanup on target if cache already got renamed
2022-01-13Fix psalm issuesCarl Schwan
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13Add helper method in WrapperCarl Schwan
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-12updateEncryptedVersion: cleanup on target if cache already got renamedJonas Meurer
When moving a file to trash with encryption enabled, the cache gets moved before the actual file. According to @icewind1991 this is in order to not break object storage. When moving a file from an unencrypted storage (e.g. a collectives storage) to the encrypted trashbin storage, this causes errors, see This commit fixes it by doing `updateEncryptedVersion()` on the target cache entry *if* the source cache entry doesn't exist anymore, but the corresponding target cache entry does exist already. Fixes: #26544 Signed-off-by: Jonas Meurer <jonas@freesources.org>
2022-01-10Fix fail when keys/files folder already existsVincent Petry
Fixes an issue with transfer ownership in move mode where the folder "files_encryption/keys/files" already exists. Instead of failing, its existence is checked before calling mkdir. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-12-09Check resource before closing in encryption wrapperVincent Petry
In case of error there is no guarantee that $source or $target is set or is a resource when handling an error. Without this fix, there's a risk that fclose will fail and the actual exception will not be thrown, making it impossible to find out about the root cause. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-25Check for invalid characters before trimmingJoas Schilling
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-19Merge pull request #29758 from nextcloud/disk_free_space-fix-php8Vincent Petry
Check for `disk_free_space`
2021-11-18Check for `disk_free_space`acsfer
Check for `disk_free_space` before calling it. Fix https://github.com/nextcloud/server/issues/29748
2021-11-17Normalize directory entries in Encoding wrapperVincent Petry
Directory entry file names are now normalized in getMetaData(), getDirectoryContents() and opendir(). This makes the scanner work properly as it assumes pre-normalized names. In case the names were not normalized, the scanner will now skip the entries and display a warning when applicable. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-05Update lib/private/Files/Storage/Wrapper/Availability.php add void Vincent Petry
Signed-off-by: Vincent Petry <vincent@nextcloud.com> Co-authored-by: Carl Schwan <carl@carlschwan.eu>
2021-11-05Return false in hasUpdated when storage is not availableVincent Petry
Technically, saying that a storage has no updates when it's not available is correct. This makes it possible to retrieve the cache entry for the mount point and also to list and remove unavailable federated shares. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-10-23Add type hint to fread_block $blockSize param & apply cs:fix.alanmeeson
Signed-off-by: alanmeeson <alan@carefullycalculated.co.uk>
2021-10-23Fix truncation of files upon read when using object store and encryption.Alan Meeson
When using and object store as primary storage and using the default encryption module at the same time, any encrypted file would be truncated when read, and a text error message added to the end. This was caused by a combination of the reliance of the read functions on on knowing the unencrypted file size, and a bug in the function which calculated the unencrypted file size for a given file. In order to calculate the unencrypted file size, the function would first skip the header block, then use fseek to skip to the last encrypted block in the file. Because there was a corresponence between the encrypted and unencrypted blocks, this would also be the last encrypted block. It would then read the final block and decrypt it to get the unencrypted length of the last block. With that, the number of blocks, and the unencrypted block size, it could calculate the unencrypted file size. The trouble was that when using an object store, an fread call doesn't always get you the number of bytes you asked for, even if they are available. To resolve this I adapted the stream_read_block function from lib/private/Files/Streams/Encryption.php to work here. This function wraps the fread call in a loop and repeats until it has the entire set of bytes that were requested, or there are no more to get. This fixes the imediate bug, and should (with luck) allow people to get their encrypted files out of Nextcloud now. (The problem was purely on the decryption side). In the future it would be nice to do some refactoring here. I have tested this with image files ranging from 1kb to 10mb using Nextcloud version 22.1.0 (the nextcloud:22.1-apache docker image), with sqlite and a Linode object store as the primary storage. Signed-off-by: Alan Meeson <alan@carefullycalculated.co.uk>
2021-10-23Merge pull request #27440 from nextcloud/is-file-handleJohn Molakvoæ
2021-10-22Merge branch 'master' into imountpoint-ocp-storageJohn Molakvoæ
2021-10-21Fix security issues when copying groupfolder with advanced ACLCarl Schwan
Using advanced ACL, it is possible that an user has access to a directory but not to a subdirectory, so the copying use Common::copyFromStorage instead of Local::copyFromStorage. Fix https://github.com/nextcloud/groupfolders/issues/1692 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-10-18Merge pull request #28768 from nextcloud/check-file-existsJohn Molakvoæ
2021-10-14Merge pull request #27194 from nextcloud/new-ftpJohn Molakvoæ
2021-10-07make param names consistent with interface for copy directory polyfillRobin Appelman
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-04Simplify :)acsfer
2021-10-04Replace `file_exists()` method by `is_file()`acsfer
2021-10-02Get `filesize()` if `file_exists()`acsfer
Should make sense.
2021-09-21explicitly close source stream on encryption storageDaniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-09-21explicitly close source stream on local storageDaniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-08-15Handle files with is_file instead of file_existsacsfer
Should fix things like `fread(): read of 8192 bytes failed with errno=21 Is a directory`
2021-08-13Make sure that a empty directory can still be deleted when copied from ↵Julius Härtl
another storage Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-08-10Merge pull request #27923 from nextcloud/remove-flysystem-storage-classLukas Reschke
Remove Flysystem storage class
2021-07-29Remove some mentions of ownCloud from our api documentationCarl Schwan
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-07-12Remove Flysystem storage classLukas Reschke
This seems unused as per https://github.com/nextcloud/server/issues/27768 and may allow us to get rid of one more dependency. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-17Fix scanner mistaking socket files for directoriesRid
Signed-off-by: Rid <rid@cylo.io>
2021-06-04Update php licensesJohn Molakvoæ (skjnldsv)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-04-27better cleanup of user files on user deletionRobin Appelman
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-04-06Merge pull request #24966 from nextcloud/jknockaert-patch-1Lukas Reschke
avoid fread on directories and unencrypted files
2021-03-30Merge pull request #25280 from nextcloud/explicit-file-permissionsRoeland Jago Douma
Set umask before operations that create local files
2021-03-24show better error messages when a file with a forbidden path is encounteredRobin Appelman
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23Set umask before operations that create local filesRobin Appelman
this solves issues where "other php stuff" is messing with the umask Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23dont return private storage interface from public mount interfaceRobin Appelman
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-09apply object store copy optimization when 'cross storage' copy is within the ↵Robin Appelman
same object store Signed-off-by: Robin Appelman <robin@icewind.nl>