Commit graph

5687 commits

Author SHA1 Message Date
Joas Schilling
decc236f98
fix(message): Fix logic of Mail test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-10-21 11:28:54 +02:00
Joas Schilling
498c3dc566 fix(comments): Add test for email mention
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-10-18 06:21:01 +00:00
Ferdinand Thiessen
761f7e1f70
Merge pull request #48703 from nextcloud/backport/48673/stable30
[stable30] fix(share): Return empty string if no label is set
2024-10-17 18:25:16 +02:00
Ferdinand Thiessen
dfe8f642cd fix(share): Return empty string if no label is set
* Resolves: https://github.com/nextcloud/server/issues/48629

While the database supports NULL, the typing has always said it only returns *string*.
So to not break any apps that might trust the typings we should return `''` if the database is set to `NULL`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-14 17:11:16 +00:00
provokateurin
d10330b217
fix(UserTrait): Fix backend initialization
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-08 21:02:30 +02:00
Ferdinand Thiessen
7dd85e15b9
fix: Make user removal more resilient
Currently there is a problem if an exception is thrown in `User::delete`,
because at that point the user is already removed from the backend,
but not all data is deleted.

There is no way to recover from this state, as the user is gone no information is available anymore.
This means the data is still available on the server but can not removed by any API anymore.

The solution here is to first set a flag and backup the user home,
this can be used to recover failed user deletions in a way the delete can be re-tried.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-08 21:02:07 +02:00
Benjamin Gaussorgues
8290de3b93
Merge pull request #48077 from nextcloud/backport/47852/stable30 2024-10-02 10:43:41 +02:00
Richard Steinmetz
c4ffd84439
fix: gracefully parse non-standard trusted certificates
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2024-09-30 09:11:42 +02:00
Louis Chemineau
9a34a6c4c4
fix(users): Don't crash if disabled user is missing in the database
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-09-23 18:06:38 +02:00
Kate
ae7241f6c8
Merge pull request #48221 from nextcloud/backport/30/fix_move_on_same_bucket 2024-09-20 10:06:14 +02:00
Côme Chilliet
656e32c6c1 fix(tests): Fix most obvious errors in ObjectStore tests
Some are still failing

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-19 18:54:26 +02:00
Christoph Fiehe
82be489f53 perf(ObjectStoreStorage): Improve (slow) move on same object bucket
This commit fixes the issue #47856. When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage.

The behavior improves a lot with https://github.com/nextcloud/server/pull/46013. However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder.

Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
2024-09-19 18:53:36 +02:00
Côme Chilliet
61da345203 fix(tests): Fix Folder tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-19 14:24:22 +02:00
Côme Chilliet
b44ac8238d fix(tests): Remove deprecated tests for ServerTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-19 14:24:22 +02:00
Robin Appelman
8b8508c8b1 test: put parent items into cache in tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-19 13:59:08 +02:00
Robin Appelman
e82ab7816f test: fix incorrect ltrim usage in test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-19 13:59:08 +02:00
Kate
e4f5d39464
Merge pull request #48088 from nextcloud/backport/48008/stable30 2024-09-17 12:53:41 +02:00
Josh Richards
a7b4808b32 fix(config): add envCache tests for getKeys()
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2024-09-16 15:06:03 +00:00
provokateurin
b7b5b50050 fix(Entity): Fix magic setter call for custom strong typed setters
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-16 13:52:27 +00:00
Robin Appelman
914e8f9ce2 fix: misc code fixes around db sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-16 12:19:20 +02:00
Andy Scherzinger
90a6b82579
Merge pull request #47940 from nextcloud/backport/47933/stable30
[stable30] fix(config): Throw PreconditionException always when it didn't match
2024-09-15 21:29:14 +02:00
Andy Scherzinger
fa355386f7
Merge pull request #47796 from nextcloud/backport/47756/stable30
[stable30] fix(files): Check if target path is a descendant of the shared folder
2024-09-15 21:25:30 +02:00
Joas Schilling
66a6b442b5 fix(config): Throw PreconditionException always when it didn't match
Previously even when the precondition did not match, the call "passed"
when the after value was the expected one. This however can lead to
race conditions, duplicate code excutions and other things.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-09-13 11:40:13 +00:00
Julius Knorr
80eec3f0ef fix: Add whiteboard to education and public sector bundle
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2024-09-12 09:08:22 +00:00
Git'Fellow
2bb8c023c2 fix(files): Check if the target path is a descendant of the shared folder path
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: tests

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: fix tests

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: add tests

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: tests
2024-09-06 02:00:43 +00:00
provokateurin
b9aaa9f2e0 fix(files): Create non-existent parents of mountpoints
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-04 18:04:13 +00:00
Ferdinand Thiessen
6ea52ed218 fix: Adjust filename validation messages
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-30 14:48:23 +02:00
Marcel Klehr
77464a4a0d
fix(TaskProcessing): Fix namespace of TaskProcessingTest.php
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2024-08-30 14:06:15 +02:00
Julien Veyssier
d2ec025fa4
fix(taskprocessing): fix tests
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2024-08-30 14:06:15 +02:00
Arthur Schiwon
656412daa4
test(phpunit): skip sharding tests on 32bit
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-08-29 20:19:33 +02:00
Ferdinand Thiessen
183fcef39b
fix: Renaming does not need update but delete permissions
Renaming is basically copy + delete (a move), so no need to update permissions.
Especially if the node is in a invalid directory the node should be moveable but not editable.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-28 20:23:50 +02:00
Louis Chemineau
140b36fcea fix: Backport to 30
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-08-28 14:54:14 +02:00
Louis Chemineau
e5a8f996bd chore: Apply php:cs recommendations
Signed-off-by: Louis Chemineau <louis@chmn.me>

[skip ci]
2024-08-28 14:54:14 +02:00
Robin Appelman
b2645590ce fix: implement sharding compatible cleanup for various bits
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 14:54:14 +02:00
Robin Appelman
1b6d76aa1b test: fix share provider tests for sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 14:54:14 +02:00
Robin Appelman
ecf1cc2c3c test: mark share test cleanup as running across all shards
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 14:54:14 +02:00
Robin Appelman
82d7eaf80a feat: implement distributing partitioned queries over multiple shards
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 14:54:14 +02:00
Robin Appelman
4ec53e723e feat: add option to automatically partition queries by specific tables
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 14:54:14 +02:00
Robin Appelman
8f57d46a0b fix: delay calculating global cache prefix untill a cache is created
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 14:54:14 +02:00
Robin Appelman
3e35e62f6b feat: add negative compare-and-delete to imemcache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-23 11:37:57 +00:00
Ferdinand Thiessen
1e49c83556 fix: FilenameValidator::isForbidden should only check forbidden files
And not forbidden basenames as this is used for different purposes.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-22 08:51:58 +02:00
Joas Schilling
eea5378344 ci: Skip flaky test on PHP 8.3
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-08-21 13:55:13 +00:00
Ferdinand Thiessen
3e409fd342
Merge pull request #43573 from nextcloud/HolgerHees-fix-csp-nonce-handling
Fix for ignored `CSP_NONCE` in ContentSecurity Header
2024-08-13 17:53:30 +02:00
Christoph Wurst
5100e3152d
feat(auth): Clean-up unused auth tokens and wipe tokens
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-08-13 12:39:11 +02:00
Ferdinand Thiessen
2916e5df7e
feat: Provide CSP nonce as <meta> element
This way we use the CSP nonce for dynamically loaded scripts.
Important to notice: The CSP nonce must NOT be injected in `content` as
this can lead to value exfiltration using e.g. side-channel attacts (CSS selectors).

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-13 10:32:44 +02:00
Ferdinand Thiessen
009761be58
test: Adjust tests for CSP nonce
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-13 10:06:32 +02:00
Côme Chilliet
1cfc25d08c
fix(tests): Adapt tests to change of DefaultShareProvider constructor
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-08-12 15:20:21 +02:00
Ferdinand Thiessen
0563757ea4 fix(SetupCheck): Properly check public access to data directory
When checking for public (web) access to the data directory the status is not enough
as you might have a webserver that forwards to e.g. a login page.
So instead check that the content of the file matches.

For this the `.ncdata` file (renamed from `.ocdata`¹) has minimal text content
to allow checking.

¹The file was renamed from the legacy `.ocdata`, there is a repair step to remove the old one.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-08 22:08:42 +02:00
Christoph Wurst
2b38d6ae7e
fix(session): Log when session_* calls are slow
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-08-07 09:02:10 +02:00
skjnldsv
db28aa8cd1 fix(files_sharing): show proper share not found error message
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-08-06 16:25:10 +02:00