| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
| |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
| |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
| |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
| |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
| |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
|
|
| |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
| |
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
|
|
|
|
|
|
|
| |
In File::getContent, which must return a string, throw an Exception
instead of returning false.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|\
| |
| | |
fix unencrypted_size for folders when scanning the filesystem with encryption enabled
|
| |
| |
| |
| | |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|\ \
| | |
| | | |
fix encryption wrapper filesize for non existing files
|
| |/
| |
| |
| | |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|/
|
|
| |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
| |
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
|
|
|
|
| |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
|
| |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
|
| |
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
|
|
|
|
|
| |
Because the parameter type was moved to phpdoc it needs to be removed
from implementations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
|
| |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
|
| |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
|
| |
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
|
|
|
|
| |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
|
| |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
|
| |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
|
| |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
| |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
| |
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
|
|
|
| |
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
|
|
|
|
|
|
| |
always apply the wrapper but have the wrapper get the quota lazily only when an operation where quota is applied is performed
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
|
|
|
|
| |
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
|
|
|
|
| |
Signed-off-by: Robin Appelman <robin@icewind.nl>
|
|
|
|
|
|
| |
Encryption constructor is problematic and should still be fixed later.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|
|
|
| |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
|\
| |
| | |
updateEncryptedVersion: cleanup on target if cache already got renamed
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
|
|/
|
|
| |
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-authored-by: Carl Schwan <carl@carlschwan.eu>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: alanmeeson <alan@carefullycalculated.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| | |
Should fix things like `fread(): read of 8192 bytes failed with errno=21 Is a directory`
|
|\ \ |
|
| |/
| |
| |
| | |
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
| |
| |
| |
| | |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|