Commit graph

705 commits

Author SHA1 Message Date
Louis Chemineau
52aec18d8e fix(contacts): Do not expose SAB in /contactsmenu
When hitting the `/contactsmenu/contacts` endpoint with the `dav.system_addressbook_exposed` config switch set to `"no"`, the system address book content is still listed in the response.

This ensure that we do not expose unexpectedly the system address book.

Signed-off-by: Louis Chmn <louis@chmn.me>
2025-10-14 18:54:35 +02:00
provokateurin
1fd72c9fe8
fix(core): Stop abusing the cache for avatar upload
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-09-26 19:34:58 +02:00
dependabot[bot]
09fa8b2b55
build(deps-dev): bump phpunit/phpunit in /build/integration
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.25 to 9.6.26.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.26/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.25...9.6.26)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 9.6.26
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-13 02:27:45 +00:00
Ferdinand Thiessen
fe358f23d9
fix(dav): ensure moving or copying a file is possible
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-02 18:01:41 +02:00
dependabot[bot]
6aaccc6994
chore(deps-dev): bump phpunit/phpunit in /build/integration
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.24 to 9.6.25.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.25/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.24...9.6.25)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 9.6.25
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-24 14:39:58 +00:00
dependabot[bot]
f219cf1b58
chore(deps-dev): bump phpunit/phpunit in /build/integration
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.23 to 9.6.24.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.24/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.23...9.6.24)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 9.6.24
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-16 02:29:28 +00:00
Daniel Calviño Sánchez
c6f870245a fix: Fix theming for disabled accounts
The Theming app injects the stylesheets for the different themes in the
"<header>" element of the page, and those stylesheets are then loaded by
the browser from a "Controller" (a plain "Controller", not an
"OCSController"). The stylesheets, in turn, may also get some images
(like the background) also from the "Controller".

When handling a request to "index.php" it is checked whether the user is
logged in and, if not, a login is tried. A disabled user is explicitly
seen as not logged in, so a login is always tried in that case, but
disabled users are also explicitly prevented to log in, so the login
also fails. Due to that trying to get any of the themed stylesheets or
images with a disabled account (to be able to show the "Account
disabled" error page) fails with an HTTP status 401.

To solve that, and to avoid touching this basic logic as much as
possible, the login exception is now ignored (if the user is disabled)
for some specific requests to the Theming app.

The clouds.jpg file was not available in stable30, so the file and its
license were copied from the commit that introduced them in newer
branches, 19ce362896.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-07-11 12:01:04 +02:00
Daniel Kesselberg
dbbacb488d
test(dav): add integration test for principal property search
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-07-02 15:40:25 +02:00
provokateurin
fd0ed28b56
fix(files): Always transfer incoming shares when doing ownership transfer to prevent broken reshares
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-01 13:11:21 +02:00
skjnldsv
cccf5a29ad fix(dav): file drop nickname
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-06-05 09:58:05 +02:00
dependabot[bot]
58eb0071e9
build(deps-dev): bump phpunit/phpunit in /build/integration
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.22 to 9.6.23.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.23/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.22...9.6.23)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 9.6.23
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-03 20:17:18 +00:00
Ferdinand Thiessen
832f79ac93
chore: apply code style
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-30 19:04:59 +02:00
Ferdinand Thiessen
744a4394fe fix(dav): allow uploading of files with long filenames
A filename must be less or equal 255 characters, but when adding the
`.part` and `.ocfiletransfer` extensions we might overflow this limit.
So we should also use filename hashes for uploading when the file has a
long filename, similar like when we are uploading to the user storage
directly.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-23 15:19:36 +00:00
dependabot[bot]
6d71a685c7
Merge pull request #52306 from nextcloud/dependabot/composer/build/integration/stable30/symfony/event-dispatcher-5.4.45 2025-04-23 07:55:21 +00:00
dependabot[bot]
b30758e8c2
Merge pull request #52305 from nextcloud/dependabot/composer/build/integration/stable30/guzzlehttp/guzzle-7.9.3 2025-04-22 23:08:33 +00:00
dependabot[bot]
9767aec442
build(deps-dev): bump phpunit/phpunit in /build/integration
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.19 to 9.6.22.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.22/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.19...9.6.22)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 9.6.22
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-22 12:56:34 +00:00
dependabot[bot]
78e8bbbb23
build(deps-dev): bump symfony/event-dispatcher in /build/integration
Bumps [symfony/event-dispatcher](https://github.com/symfony/event-dispatcher) from 5.4.34 to 5.4.45.
- [Release notes](https://github.com/symfony/event-dispatcher/releases)
- [Changelog](https://github.com/symfony/event-dispatcher/blob/7.2/CHANGELOG.md)
- [Commits](https://github.com/symfony/event-dispatcher/compare/v5.4.34...v5.4.45)

---
updated-dependencies:
- dependency-name: symfony/event-dispatcher
  dependency-version: 5.4.45
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-22 12:56:26 +00:00
dependabot[bot]
7aa15a717a
build(deps-dev): bump guzzlehttp/guzzle in /build/integration
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.9.2 to 7.9.3.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/7.9/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.9.2...7.9.3)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-version: 7.9.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-22 12:56:22 +00:00
skjnldsv
224cc58ec7
fix(files_sharing): expireDate null tests
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-04-22 11:17:58 +02:00
skjnldsv
a221f720c7 test: enable rate limiting for ratelimiting.feature
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-04-15 11:01:18 +02:00
Joas Schilling
c1e3beaead test: Disable ratelimit as tests trigger it
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-04-15 08:58:03 +00:00
Louis Chemineau
009a7a3368 feat: Support deleting metadata from WebDAV
The `$value` will be `null` if the update is wrapped inside a `<d:remove>...</d:remove>` block.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-03-05 13:39:40 +01:00
provokateurin
7b5c9feca1
fix(Share20): Convert broken hooks to IEventListener
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-04 07:58:21 +01:00
Daniel Kesselberg
e8a5e0c392 Revert "fix(dav): Always respond custom error page on exceptions"
This reverts commit 9992e7d439.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-02-15 14:42:51 +01:00
Ferdinand Thiessen
422655bf1e
fix(provisioning_api): Correct limit for editUser
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-07 12:42:23 +01:00
Robin Appelman
5d094feee0
fix: explicitly ignore nested mounts when transfering ownership
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 09:09:04 +01:00
Ferdinand Thiessen
f9bd0ed462
fix(sharing): Ensure download restrictions are not dropped
When a user receives a share with share-permissions but also with
download restrictions (hide download or the modern download permission attribute),
then re-shares of that share must always also include those restrictions.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-04 16:22:11 +01:00
Ferdinand Thiessen
922b12452c
test: Reset sharing app config after test
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-31 18:21:26 +01:00
Ferdinand Thiessen
ee5f5bc159
fix(files_sharing): Respect permissions passed when creating link shares
Given:
User creates a link or email share with permissions=4 (create only = file drop).

Problem:
Currently the permissions are automatically extended to permissions = 5
(READ + CREATE). Work around was to create the share and directly update
it.

Solution:
Respect what the user is requesting, create a file drop share.

Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-31 18:21:26 +01:00
Richard Steinmetz
8fb04cd4d5
fix(dav): default calendar and address book not created on first login
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2025-01-23 22:29:07 +01:00
Robin Appelman
c6e68988d2 fix: block moving files to it's own parent with dav
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-07 09:26:05 +00:00
Joas Schilling
b9493cc12d fix(logger): Prevent infinite recursion with log.condition => matches
When we need to check the log condition for a user matches,
there is a risk that something on the way checks the log level
and would result in an infinite loop.
So we simply check if it's a nested call and use the default
warning level in that case.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-01-03 11:12:48 +00:00
Louis Chemineau
d3274bc6d2
test(ExternalStorage): Send basic auth during integrations tests
Signed-off-by: Louis Chemineau <louis@chmn.me>

[skip ci]
2024-11-28 13:03:52 +01:00
skjnldsv
bf728f9d51 fix(dav): file request guest nickname encoding
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-11-13 09:05:17 +01:00
Benjamin Gaussorgues
8af1e9f82d
Merge pull request #48474 from nextcloud/backport/47846/stable30 2024-10-30 09:29:20 +01:00
Ferdinand Thiessen
b79d2b7041
fix(dav): Public WebDAV endpoint should allow GET requests
`GET` should be allowed even without Ajax header to allow downloading files,
or show files in the viewer. All other requests could be guarded, but this should not.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-09 17:40:50 +02:00
Hamza Mahjoubi
ba9787088a fix: provision api's status codes
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
2024-10-09 13:49:04 +02:00
skjnldsv
338e045141 fix(files_sharing): adjust permissions from custom edit and delete check methods
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-09-11 11:48:25 +00:00
Louis Chemineau
23b77dc7ec fix(dav): Always respond custom error page on exceptions
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-09-05 18:17:10 +00:00
Daniel Calviño Sánchez
61b64b109c fix: Fix unmodified placeholder replacing the actual value when updating
When updating global storages and user storages a property is not
updated by "StoragesService::updateStorage()" if the value matches the
unmodified placeholder. However, userglobal storages are not updated
through the "StoragesService"; as only the authentication mechanism is
updated it is directly done with "saveBackendOptions()" in
"IUserProvided" or "UserGlobalAuth". Due to this the unmodified
placeholder value needs to be explicitly checked in those cases and
replaced by the actual value (note that in this case it is not possible
to just skip updating a specific property).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2024-09-04 10:11:59 +00:00
Daniel Calviño Sánchez
9a8beb417e test: Add integration tests for saving external userglobal storages
As the external storage uses the Nextcloud server itself the number of
workers of the PHP process running the Nextcloud server had to be
increased. Otherwise if a request is sent for the external storage while
handling a request from the integration tests a deadlock would occur.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2024-09-04 10:11:59 +00:00
provokateurin
863679f499
fix(test): Fix provisioning enabled apps
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-08-29 09:43:37 +02:00
Ferdinand Thiessen
4bbcbc5206
feat: Make ISharedStorage public API and reuse where possible
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-12 11:42:10 +02:00
Ferdinand Thiessen
cb1b366baf
fix(dav): Ensure share properties are also set on public remote endpoint
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-12 11:28:03 +02:00
Julius Härtl
a6d421e767
chore: Remove deprecated legacy search backend
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-08-01 12:33:18 +02:00
dependabot[bot]
8c1cbaa8c3
build(deps-dev): bump guzzlehttp/guzzle in /build/integration
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.9.1 to 7.9.2.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/7.9/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.9.1...7.9.2)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-27 01:13:38 +00:00
dependabot[bot]
4b9967f872
chore(deps-dev): bump guzzlehttp/guzzle in /build/integration
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.8.1 to 7.9.1.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/7.9/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.8.1...7.9.1)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-20 01:13:01 +00:00
skjnldsv
725736a754 chore(integration): add file request tests
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-19 07:35:51 +02:00
skjnldsv
9b84831c8d fix(files_sharing): adjust IAttributes API and files_versions
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +02:00
Ferdinand Thiessen
a229723b8c
feat: Add new forbidden filename options to Capabilities
Allow clients to access the new filename validation options
and make frontend name validation possible.

Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-11 13:31:54 +02:00