Louis
0b3041586b
Merge pull request #55981 from nextcloud/artonge/fix/encryption/increment_lastChunkNr
...
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (master, 8.4, main, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Waiting to run
Psalm static code analysis / static-code-analysis-security (push) Waiting to run
Psalm static code analysis / static-code-analysis-ocp (push) Waiting to run
Psalm static code analysis / static-code-analysis-ncu (push) Waiting to run
fix(encryption): Increment `lastChunkNr` when size is off
2025-11-25 10:18:43 +01:00
Joas Schilling
00e1264ade
Merge pull request #56416 from nextcloud/fix/clear-mount-cache-on-storage-change
...
fix: Clear mount cache when file storage changes during move
2025-11-24 14:03:41 +01:00
Kent Delante
96672e1c4d
feat: emit an event when an S3 bucket is created
...
Signed-off-by: Kent Delante <kent.delante@proton.me>
2025-11-24 19:37:18 +08:00
Andy Scherzinger
9e2f07b7d4
Merge pull request #56395 from nextcloud/carl/cache-bucket-exists
...
perf(s3): Cache whether bucket exists
2025-11-24 12:13:27 +01:00
Louis Chmn
30d567fd0e
fix(encryption): Increment lastChunkNr when size is off
...
When computing the unencrypted file size, we need the size of the last encrypted chunk as its size is usually not the regular 8192 bits.
To avoid reading the whole file, we seek directly to that last chunk based on the expected file size. When the expected file size is smaller than the actual one, we have a logic in place to continue reading until we reach the end of the file.
In that logic, we forgot to increment the `$lastChunkNr` which is important when we later check the signature of the chunk.
This commit adds that missing increment.
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-21 17:34:19 +01:00
Carl Schwan
a228ffa641
refactor(s3): Readability
...
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2025-11-20 16:50:14 +01:00
Benjamin Frueh
989b75ee43
fix: Clear mount cache when file storage changes during move
...
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
2025-11-20 09:15:28 +01:00
nfebe
3030783785
feat(objectstore): add configurable S3 retry attempts
...
Add retriesMaxAttempts parameter to S3 objectstore configuration
to allow customization of AWS SDK retry behavior for handling
unreliable network conditions or proxy issues.
Defaults to 5 retries (AWS SDK default) if not specified.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-11-19 16:17:43 +01:00
Robin Appelman
a7d130c598
Revert "fix(ObjectStoreStorage): Encode original-path in writeStream by @frabe1579"
...
This reverts commit 4b4b39e7ec .
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-11-18 19:53:17 +01:00
Robin Appelman
8194be795d
fix: encode s3 metadata as base64 if needed
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-11-18 16:06:57 +01:00
Carl Schwan
67d0307e66
perf(s3): Cache whether bucket exists
...
Otherwise, we call doesBucketExist all the time which does a network
request to the S3 server adding some non-trivial latency when creating a
S3 connection object.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-11-12 14:17:48 +01:00
Robin Appelman
17104bf3a0
chore: better type hints for getAvailability
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-11-06 20:09:17 +01:00
Robin Appelman
2970232790
fix: make failed availability check apply in the same request
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-11-06 20:08:44 +01:00
Kate
e3edf43e28
Merge pull request #56096 from nextcloud/fix/56077/s3-configure-checksum-defaults
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (master, 8.4, main, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Waiting to run
Psalm static code analysis / static-code-analysis-security (push) Waiting to run
Psalm static code analysis / static-code-analysis-ocp (push) Waiting to run
Psalm static code analysis / static-code-analysis-ncu (push) Waiting to run
2025-11-03 11:08:33 +01:00
Stephan Orbaugh
ef21c79368
Merge pull request #55717 from DaanSelen/fix-issue-55665
...
fix(ObjectStoreStorage): fix s3 path encoding (issue causing 55665)
2025-11-03 10:58:53 +01:00
Fiehe Christoph
b87add2711
fix(s3): expose request_checksum_calculation and response_checksum_validation
...
Fix https://github.com/nextcloud/server/issues/56077
This commit makes the configuration settings 'request_checksum_calculation' and 'response_checksum_validation' of the S3Client from the AWS SDK for PHP configurable.
Signed-off-by: Fiehe Christoph <c.fiehe@eurodata.de>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-10-30 11:57:32 +01:00
Daniel Kesselberg
6e04437de6
fix: validate filename when creating file from template
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-10-24 01:05:48 +02:00
Ferdinand Thiessen
2369ad9601
Merge pull request #55629 from nextcloud/carl/cleanup-propagator
...
refactor(IPropagator): Cleanup implementation
2025-10-22 21:50:47 +02:00
Côme Chilliet
1686bb61a0
Merge pull request #55719 from nextcloud/fix-object-store-storage-free-space
...
fix(objectstore): add named parameter for like query in object storage free space detection
2025-10-20 09:37:33 +02:00
Daan Selen
4b4b39e7ec
fix(ObjectStoreStorage): Encode original-path in writeStream by @frabe1579
...
Signed-off-by: Daan Selen <dselen@systemec.nl>
2025-10-15 11:53:39 +02:00
Côme Chilliet
ad9574970a
fix: Fix crash in files_version about uninitialized property
...
Fix "Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization"
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-10-14 16:56:07 +02:00
Josh
bd43cb7d04
fix(files): decrement quota by actual bytes written in stream_write
...
The quota is now decremented by the actual number of bytes written ($written) rather than the intended size.
This ensures quota tracking stays accurate even if fwrite writes fewer (or more - i.e. from underlying buffering/etc) bytes than requested.
Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-10-13 18:26:48 -04:00
Thomas Citharel
5c8bdad828
fix(objectstore): add named parameter for like query
...
to avoid 'object::%' to be considered as a column
(`la colonne \\u00ab object::% \\u00bb n'existe pas` on PG)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2025-10-13 16:18:18 +02:00
Louis Chmn
00ec57efd6
fix(S3): Only append streams if non-seekable
...
Later, when we rewind the stream in `writeMultiPart` during retry, both streams were rewinded, so the resulting stream was bigger than expected.
Inspired by https://github.com/aws/aws-sdk-php/blob/master/src/S3/ObjectUploader.php#L136-L146
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-10-10 09:54:05 +02:00
Marcel Klehr
3522a3375e
fix(FileAccess): Make getAncestorInStorage pass sharding tests
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 09:27:50 +02:00
Marcel Klehr
b158a77365
fix(FileAccess): Try to fix type error
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 09:27:50 +02:00
Marcel Klehr
62bff06aeb
fix(FileAccess): Chunk parent query
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 09:27:50 +02:00
Marcel Klehr
9ccc798655
fix(FileAccess): Make getByAncestorInStorage sharding ready
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 09:27:50 +02:00
Carl Schwan
475c84722f
refactor(IPropagator): Cleanup implementation
...
- Add missing type hinting
- Use only public methods from IStorage instead of relying on internal
\OC\Storage methods
- Refactor HomePropagator to use ignore argument from Propagator instead
of reimplementing the same logic.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-08 17:15:18 +02:00
Benjamin Gaussorgues
3aa0c23e40
Merge pull request #54543 from nextcloud/preview-db-rework
2025-10-08 16:39:23 +02:00
Carl Schwan
bef3996c3e
fix(preview): Make version column a string
...
And move it to a different table so that we don't have to pay the
storage cost when not using it (most of the times).
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-08 14:07:06 +02:00
Carl Schwan
f450cda3aa
chore: Explicitely mark \OC\Files\View as internal
...
It's in OC and should not be used at all. Marking it as internal will
at least prevent new code to use it.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 15:49:55 +02:00
Carl Schwan
66f50bd585
refactor(preview): Use same mimetype ids as filecache
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
bfc7d5dd9f
feat(preview): Implement scanning for previews
...
This work similarly to the move preview job to migrate the previews to
the new DB table and also reuse some code.
So when we are finding files in appdata/preview, try adding them to the
oc_previews table and delete them from the oc_filecache table.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
b0357663b9
perf(preview): Optimize migration and simplify DB layout
...
* Simplify migration by not moving the actual files and just updating
the DB
* Don't store the storageid in the preview table as it is not needed
* Start adding tests
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
13c35c0f17
perf(preview): Migrate previews to the new optimized table
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
18fbacdd8d
perf(preview): Split preview data to new table
...
The new oc_previews table is optimized for storing previews and should
decrease significantly the space taken by previews in the filecache
table.
This attend to reuse the IObjectStore abstraction over S3/Swift/Azure
but currently only support one single bucket configuration.
Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
2025-10-06 13:37:15 +02:00
Kate
057c0dcc98
Merge pull request #55564 from nextcloud/fix/files/return-valid-mimetype
2025-10-06 13:23:54 +02:00
provokateurin
8d8f94b8ce
fix(files): Always return a valid mimetype
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-10-06 09:06:17 +02:00
Carl Schwan
34cd91cc86
refactor: Fix some easy psalm issues in Files
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-02 13:34:47 +02:00
Louis
f8bed8f186
Merge pull request #51145 from nextcloud/home-folder-readonly
2025-10-01 10:09:19 +02:00
Kate
464d12e149
Merge pull request #55374 from nextcloud/fix/files/overwrite-scan-permissions
2025-09-29 18:12:03 +02:00
yemkareems
111f42ca8a
Merge branch 'master' into fix/85262/fix-typo
2025-09-29 17:15:57 +05:30
yemkareems
200f9dc39f
fix: small typo fix
...
Signed-off-by: yemkareems <yemkareems@gmail.com>
2025-09-29 09:12:38 +05:30
Côme Chilliet
d39d1d8d24
chore: Remove unused deprecated methods from OC_User and Filesystem
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-28 22:44:30 +02:00
provokateurin
ef279f6049
fix(files): Stop overwriting scan_permissions
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-09-28 14:11:47 +02:00
Carl Schwan
4ae4b0a0e7
refactor: Remove old TemplateManager
...
Not used anymore
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-09-28 12:48:41 +02:00
Ferdinand Thiessen
660f3f6fd1
refactor: use logical && || instead of weak and or operators
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +02:00
Kate
c5c3b6555f
Merge pull request #54797 from nextcloud/object-store-total-size-limit
2025-09-27 15:02:28 +02:00
Louis Chemineau
bd8a0ec3cf
feat(files): Add appconfig value to disable fixed userfolder permissions optimization
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-09-26 17:43:22 +02:00