1903 Commits

Author SHA1 Message Date
Robin Appelman
32299a8113 fix: correctly return false for filesize on non-existing file
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-02-24 18:08:43 +01:00
Kate
33bf0b4b00 Merge pull request #58520 from nextcloud/backport/58466/stable32 2026-02-23 15:34:33 +01:00
Kate
2cbdef033f Merge pull request #58368 from nextcloud/backport/58134/stable32 2026-02-23 14:11:34 +01:00
Carl Schwan
41d12ac013 fix(propagator): Don't run queries if no parents
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-23 11:59:54 +00:00
Carl Schwan
681dbd7481 fix(propagator): Lock rows also in propagateChange
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-20 16:33:04 +01:00
Kate
be40b35d0a Merge pull request #58456 from nextcloud/backport/57878/stable32 2026-02-20 14:17:42 +01:00
provokateurin
c182d862fc fix(View): Handle ICacheEntry returned by FileInfo->getData()
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-20 08:49:32 +00:00
provokateurin
398747f46b fix(Propagator): Also skip groupfolders versions and trash entries
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-20 05:23:34 +00:00
provokateurin
273df540d6 fix(Propagator): Skip groupfolders root entries
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-19 13:09:02 +00:00
Ferdinand Thiessen
0c8b04e141 fix(cache): filter out invalid entries in OC\Files\Cache\Wrapper\CacheWrapper::getFolderContentsById
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-17 12:30:19 +00:00
Carl Schwan
cbe4a26156 fix(propagator): Improve lock behavior of propagator
Fix possible dead locks when running the propagator caused by two
requests updating the same amount rows in transactions.

- Lock rows always in the same deterministic order by sorting the
  path_hash first

- On all database outside of sqlite, also do first a SELECT FOR UPDATE
  to lock all the rows used in batch UPDATE calls, afterward to decrease
  the risk of two requests trying to lock the same rows

Signed-off-by: Carl Schwan <carlschwan@kde.org>
(cherry picked from commit cae742d182)
2026-02-17 10:39:11 +01:00
Côme Chilliet
c953d36dee fix: Use strict array comparisons in lib/
To avoid surprises with corner cases.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-01-18 18:45:07 +01:00
Louis Chemineau
4381cc8f84 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>
2026-01-14 14:31:12 +01:00
Benjamin Gaussorgues
b3347f1821 Merge pull request #57346 from nextcloud/backport/57186/stable32 2026-01-08 11:02:41 +01:00
Robin Appelman
f525ae0ff7 feat: don't gate perBucket object store configuration behind multibucket
a setup can have multiple bucket without having `multibucket` enabled trough things like per-groupfolder buckets

Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-05 15:50:23 +00:00
Robin Appelman
56cc62d215 fix: use interfaces instead of classes in Cache\Watcher type hints
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-12-31 13:15:24 +01:00
Robin Appelman
efe257cc59 feat: add an option to filter what paths get checked for updates
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-12-31 13:15:17 +01:00
provokateurin
3d113daa60 fix(UserMountCache): Add back unique index for oc_mounts and use normal insert
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-12-16 10:47:30 +01:00
Côme Chilliet
02f23d566f fix: Log missing nodes of shares at debug level
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-12-15 16:57:22 +01:00
Côme Chilliet
cc5795ba45 fix: Fix orphan shares blocking moving other shares
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-12-15 16:57:22 +01:00
Elizabeth Danzberger
00005689e9 fix(templates): deduplicate provider templates
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
2025-12-11 21:21:56 -05:00
Andy Scherzinger
264c982cc0 Merge pull request #56573 from nextcloud/backport/56515/stable32
[stable32] Encode s3 metadata as base64 if needed
2025-12-04 08:09:41 +01:00
Daniel Kesselberg
9af9395d5c fix(s3): make data integrity protections opt-in
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-12-03 19:52:17 +01:00
nfebe
3e2582c4e6 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>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-12-03 12:48:52 +01:00
provokateurin
57734fbd01 feat(ObjectStore): Allow overriding arguments per bucket
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-12-01 16:44:55 +00:00
Andy Scherzinger
8c09cdd07d Merge pull request #56766 from nextcloud/backport/52749/stable32
[stable32] feat(CertificateManager): Add option to specify the default certificates bundle path
2025-12-01 14:54:10 +01:00
provokateurin
6b2c19df98 feat(CertificateManager): Add option to specify the default certificates bundle path
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-12-01 11:55:11 +01:00
Kent Delante
10f557d503 Merge pull request #56617 from nextcloud/backport/56565/stable32
[stable32] feat: emit an event when an S3 bucket is created
2025-11-27 10:26:40 +08:00
Kent Delante
e8802a57f4 feat: emit an event when an S3 bucket is created
Signed-off-by: Kent Delante <kent.delante@proton.me>
2025-11-26 08:18:09 +08:00
Louis Chmn
64fed0c712 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-25 09:19:23 +00:00
Robin Appelman
d2b176fee8 fix: encode s3 metadata as base64 if needed
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-11-21 16:18:22 +00:00
Benjamin Frueh
a25b0406ca fix: Clear mount cache when file storage changes during move
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
2025-11-13 14:09:23 +00:00
Robin Appelman
dbf084054e chore: better type hints for getAvailability
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-11-12 17:45:55 +00:00
Robin Appelman
8b3f4da52f fix: make failed availability check apply in the same request
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-11-12 17:45:55 +00:00
Fiehe Christoph
91434f1893 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-11-03 16:07:08 +01:00
Daniel Kesselberg
ac1fd94839 fix: validate filename when creating file from template
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-10-24 10:53:37 +00:00
Côme Chilliet
d84f1466e0 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 18:32:37 +00:00
Louis Chmn
2ad19b99f9 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 12:43:32 +00:00
Marcel Klehr
552ef44568 fix(FileAccess): Make getAncestorInStorage pass sharding tests
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 07:51:58 +00:00
Marcel Klehr
38f2bf6f98 fix(FileAccess): Try to fix type error
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 07:51:58 +00:00
Marcel Klehr
bb82cff328 fix(FileAccess): Chunk parent query
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 07:51:58 +00:00
Marcel Klehr
5117f9ab1e fix(FileAccess): Make getByAncestorInStorage sharding ready
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-10-09 07:51:58 +00:00
provokateurin
42f8ebaf75 fix(files): Always return a valid mimetype
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-10-06 11:24:18 +00:00
Andy Scherzinger
5653eea5f0 Merge pull request #55407 from nextcloud/backport/55394/stable32
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Integration sqlite / changes (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, --tags ~@large files_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, capabilities_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, collaboration_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, comments_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, dav_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, federation_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, file_conversions) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, filesdrop_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, ldap_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_numerical_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, remoteapi_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, routing_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, setup_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharees_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharing_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, theming_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, videoverification_features) (push) Has been cancelled
Integration sqlite / integration-sqlite-summary (push) Has been cancelled
Psalm static code analysis / static-code-analysis (push) Has been cancelled
Psalm static code analysis / static-code-analysis-security (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ocp (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ncu (push) Has been cancelled
[stable32] fix: small typo fix
2025-09-29 23:05:15 +02:00
provokateurin
9985baeb09 fix(files): Stop overwriting scan_permissions
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-09-29 16:12:24 +00:00
yemkareems
8633dd58b1 fix: small typo fix
Signed-off-by: yemkareems <yemkareems@gmail.com>
2025-09-29 12:17:22 +00:00
Louis Chemineau
6defeaa119 fix(Updater): Lower deadlock log level from warning to info
If this is safe to ignore, then it does not make sense to keep warning the admins.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-09-16 16:19:39 +00:00
Côme Chilliet
bccec549e5 fix(encryption): Take encryption enabled status into account
shouldEncrypt now returns false for all paths if encryption is disabled.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-11 21:18:37 +02:00
Côme Chilliet
feef3cfa7d fix(encryption): Correctly set encrypted to 0 when copying
If encryption got disabled, copying should set encrypted to 0 for the
 new unencrypted copy. For instance when using encryption:decrypt-all

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-11 21:18:37 +02:00
Robin Appelman
a8ee28ba62 fix: ensure all object store configuration have distict bucket names
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-09-08 13:23:47 +00:00