Commit graph

1207 commits

Author SHA1 Message Date
Vincent Petry
9ecec2fd75
Merge pull request #35894 from nextcloud/move-from-encryption
fix moving files of encrypted local storage to unencrypted local storage
2023-01-26 09:45:12 +01:00
Julius Härtl
919a840f34
Merge pull request #32798 from nextcloud/enh/sse-c
[S3] Add option to specify an SSE-C customer provided key
2023-01-25 15:59:26 +01:00
Robin Appelman
33b90d28f8 fix moving files of encrypted local storage to unencrypted local storage
for example when moving encrypted files to a groupfolder

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-01-24 16:40:41 +00:00
Thomas Citharel
00d9d49303 Add app config for default template path
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-01-24 09:39:31 +00:00
Julius Härtl
159a0c8411
feat(s3): Add option to specify an SSE-C customer provided key
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-01-24 10:36:03 +01:00
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
Côme Chilliet
5e090d044d
Merge pull request #36075 from fmenabe/s3-storage-class
Add support for s3 storage classes
2023-01-16 09:43:53 +01:00
François Ménabé
cf9bdc0274 Manage s3 storage class in objectstore
Signed-off-by: François Ménabé <francois.menabe@gmail.com>
2023-01-12 14:58:27 +01:00
Git'Fellow
e855298b3c Switch logical operators
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-01-11 16:27:33 +00:00
Côme Chilliet
a7740c0ae6
Suppress last psalm error until upstream fix is released and included
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-02 15:17:38 +01:00
Côme Chilliet
a372564850
Fix psalm spotted errors with new requirements
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-02 15:02:28 +01:00
Vincent Petry
3bcbc4701a
Merge pull request #34724 from nextcloud/encryption-read-before-cache
fix reading newly written encrypted files before their cache entry is written
2022-12-20 17:16:12 +01:00
Vincent Petry
3b7cc31f64
Merge pull request #34924 from nextcloud/cache-jail-path-prefix
escape path prefix when doing cache jail search
2022-12-16 17:27:15 +01:00
Julius Härtl
59ae6e9dd6
Also update the unencrypted size of files when creating them with empty content
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-07 19:12:06 +01:00
Julius Härtl
77edd36583
Update the unencrypted file size when closing streams
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-07 16:26:31 +01:00
Simon L
2e0d262864
Merge pull request #35576 from nextcloud/handle-possible-null-value-in-new-simple-file
Handle possible null value for file in OC\Files\SimpleFS\NewSimpleFile
2022-12-06 19:52:55 +01:00
Thomas Citharel
a5b6119ec4
Handle possible null value for file in OC\Files\SimpleFS\NewSimpleFile
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-12-03 17:25:32 +01:00
Maxence Lange
cc639a8877 compare cached filesize on download
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2022-12-01 15:42:15 -01:00
Robin Appelman
e3a0e64698
clear is-encrypted cache when trying to fix encrypted version
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-12-01 14:36:27 +01:00
Robin Appelman
e9b87c73fa
fix reading newly written encrypted files before their cache entry is written
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-11-30 14:54:56 +01:00
Andy Xheli
e69c7c4d26
Fix Executing a query: SQLSTATE[42000]
Signed-off-by: Andy Xheli <axheli@axtsolutions.com>

Fix https://github.com/nextcloud/server/issues/32007#issuecomment-1329405245

Signed-off-by: Andy Xheli <axheli@axtsolutions.com>
2022-11-29 11:24:56 -06:00
Louis Chemineau
66ba90ceff Update cache when file size === 0
The conditions were false when $result === 0.
$results here contains the number of written bits.
The correct way of checking for operation success is to check if $result === false

Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-11-23 12:43:57 +01:00
Robin Appelman
841a6a084e
delay updating setup providers untill we register the mounts
otherwise the fallback to a full setup for a missing cached mount provider will lead to a race condition

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-11-17 15:21:57 +01:00
Simon L
9d45845d2a
Merge pull request #34994 from Glandos/fileinfo_perf
[Performance] Test valid path only if file info has to be retrieved
2022-11-11 17:11:21 +01:00
Côme Chilliet
a78595a45f
Make sure that path is normalized and then checked,
and not the other way around

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-10 15:03:15 +01:00
Glandos
48ca33761f Test valid path only if file info has to be retrieved
Signed-off-by: Glandos <bugs-github@antipoul.fr>
2022-11-06 19:23:53 +01:00
Robin Appelman
f76b4473ee
escape path prefix when doing cache jail search
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-11-02 12:44:51 +01:00
szaimen
3f7c620f26 fix psalm
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-11-02 11:13:34 +01:00
szaimen
dd8774389e remove 32-bit workarounds
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-11-02 11:13:34 +01:00
Robin Appelman
a5036a973c allow disabling object store write check
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-10-26 18:45:59 +00:00
Vincent Petry
4aa8e80511
Merge pull request #34579 from nextcloud/unencrypted-size-null
fix null error in getUnencryptedSize
2022-10-21 16:53:43 +02:00
Carl Schwan
0f0f132959
Merge pull request #34624 from nextcloud/fix/files_external_psalm
Multiple fix for files external
2022-10-20 16:53:43 +02:00
Carl Schwan
a5ea677370 Rename file1 and file2 to source and target in Storage abstraction
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-18 17:21:47 +02:00
Carl Schwan
54031e370a Fix various other small psalm issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 12:40:35 +02:00
John Molakvoæ
e4ff84d468
Scope the appdata theming storage for global and users
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-14 16:18:37 +02:00
Robin Appelman
63316fc572
fix null error in getUnencryptedSize
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-10-13 15:34:48 +02:00
Julius Härtl
214a50d071
Avoid allocating too much memory for the buffer
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-11 15:34:27 +02:00
raul
95bc770a37 Fix unencrypted size calculation for files created before the Encryption storage is enabled
Signed-off-by: raul <raul@nextcloud.com>
2022-10-03 13:44:14 +02:00
raul
45a1ebcc4c Fix: Prevent deadlocks during mtime/size/etag propagation
Signed-off-by: raul <raul@nextcloud.com>
2022-10-03 13:44:14 +02:00
blizzz
ca958de7e9
Merge pull request #33566 from nextcloud/fopen-not-found-rescan
trigger a rescan when trying to fopen a file that exists in cache but not on disk
2022-10-01 21:47:26 +02:00
blizzz
f323c5b854
Merge pull request #34269 from nextcloud/td/noid/remove-unused-listener
remove listeners to OC_Filesystem::(write|rename) old style hooks
2022-10-01 16:15:39 +02:00
Carl Schwan
92a5a8f075 Cleanup tags and Share component
- Port to LoggerInterface
- Use IDBConnection and IQueryBuilder instead of raw SQL and OC_DB
- Use IEventListener instead of hooks
- Remove the now unused OC_DB and OC_DB_StatementWrapper legacy utils

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-29 15:15:28 +00:00
Robin Appelman
cb51564356 trigger a rescan when trying to fopen a file that exists in cache but not on disk
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-29 11:17:16 +02:00
Arthur Schiwon
9b7ef2962e
remove listeners to OC_Filesystem::(write|rename) old style hooks
- the events are not emitted anymore
- OC_Filesystem::isBlacklisted() is not called from anywhere else

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-09-26 21:07:08 +02:00
Carl Schwan
3950deb42f
Merge pull request #32740 from jasperweyne/patch-2
Fix open_basedir issues by AWS SDK
2022-09-19 10:19:15 +02:00
Vincent Petry
1025d049c7
Merge pull request #24596 from kofemann/dcache-worm
make NextCloud WORM file system friendly
2022-09-16 14:39:13 +02:00
Vincent Petry
b3ca186d2d
Merge pull request #34020 from nextcloud/logical-op
Switch logical operators (and|or)
2022-09-16 13:35:19 +02:00
Tigran Mkrtchyan
f41209a061 config: add a switch to control truncate before update
To avoid extra truncate on non WORM file systems, add a new config
option `localstorage.unlink_on_truncate`, which defaults to false.

The OC\Files\Storage\Local is update to respect that option.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2022-09-16 11:10:32 +02:00
Tigran Mkrtchyan
8fc4cf67f1 files: remove destination file before copying new content (WORM)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2022-09-16 10:57:17 +02:00
Robin Appelman
d8961ed10f
fix using FSEEK_END with SeekableHttpStream to get file size
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-15 17:23:16 +02:00