Commit Graph
2717 Commits
Author SHA1 Message Date
Viktor Scharf bb2db1de60 test(search): cover trailing NOT operator in invalid KQL patterns (#3982)
* test(search): cover trailing NOT operator in invalid KQL patterns

* skip downloadFile:321 for reva
2026-11-16 08:43:59 +01:00
Viktor Scharf 9c33410bbe test(guest-link): guest session does not override other credentials (#3877)
Requests that carry a guest session cookie together with other
credentials (bearer token, basic auth, public link, signed URL) must be
authenticated with those credentials, or rejected with 401 if they
are invalid, and never fall back to the guest.
2026-11-16 08:28:45 +01:00
Pascal Bleser 8fe28aaae1 Merge pull request #3993 from pbleser-oc/fix/graph-space-image-limit-name
fix(graph): name the space image size limit after space images
2026-11-13 22:52:15 +01:00
Jörn Friedrich Dreyer 0cef1028c1 Merge pull request #3950 from pbleser-oc/fix/graph-idempotent-tag-unassign
fix(graph): succeed when unassigning tags a resource doesn't have
2026-11-13 20:37:35 +01:00
Pascal Bleser 67e210a541 feat(graph): add the v1beta1 endpoints for a single drive
Under /graph/v1beta1, drives could only be listed. Getting, creating,
updating and deleting a single drive was only possible under v1.0,
which returns the permissions of a drive's root with the old role names
instead of the IDs of the unified roles.

Add GET, PATCH and DELETE on /graph/v1beta1/drives/{driveID}, and POST
on /graph/v1beta1/drives. They take the same requests as their v1.0
counterparts. GET, POST and PATCH return the drive in the v1beta1
format, like the v1beta1 list of drives does: with
$expand=root($expand=permissions), the permissions carry the unified
role IDs and grantedToV2. DELETE behaves the same in both versions.

The handlers for getting, creating and updating a drive now take the
API version as a parameter, and the v1.0 and v1beta1 routes call them
with their own version.

The acceptance test helpers for spaces can now use either version of
the Graph API.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-13 19:14:34 +01:00
Pascal Bleser ad140be6eb fix(graph): name the space image size limit after space images
The variable that sets a lower size limit for space images alone was
named after the service, GRAPH_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE,
which reads like a limit for thumbnails in general. Rename it to
OC_SPACE_IMAGE_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE, and the yaml key
from thumbnails.max_input_image_file_size to
thumbnails.space_image_max_input_image_file_size.

The shared names OC_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE and
THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE are unchanged. Neither renamed
setting has been released yet.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-13 19:01:53 +01:00
Jörn Friedrich Dreyer 55b5e7db73 Merge pull request #3944 from opencloud-eu/backport-wp2-batch-e
fix(graph): port share permission and link fixes
2026-11-13 18:50:37 +01:00
Jörn Friedrich Dreyer c88d94ea2b Merge pull request #3986 from pbleser-oc/fix/graph-space-image-size
fix(graph): refuse space images too large for a thumbnail
2026-11-13 18:28:35 +01:00
Jörn Friedrich Dreyer 8a56177b82 fix(graph): reject links on the shares space root
Creating a link on the root of the Shares drive was only caught later
by the permission check, and an internal link with the internal role
was not rejected at all. We now answer with a 400 "cannot create link
on shares space root" before even looking at the request body, just
like we do for the personal space root.

The acceptance scenarios now expect the new message for the Shares
drive, and the internal link scenario covers the Shares drive again.

ported from `owncloud/ocis#11543`

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-13 18:18:31 +01:00
Jörn Friedrich Dreyer 4bb1feef67 Merge pull request #3964 from opencloud-eu/backport-wp2-753
fix(graph): apply the role allowlist to permission updates
2026-11-13 18:13:41 +01:00
Jörn Friedrich Dreyer ede21a0ac6 Merge branch 'main' into workpagages
The only conflicts were the reva bump in go.mod, go.sum and vendor.
main moved to reva v2.52.2, workpagages already points to reva main
036856689, which contains v2.52.2, so we keep that and re-vendor.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-13 17:03:53 +01:00
Jörn Friedrich Dreyer a24d49a296 Merge pull request #3839 from opencloud-eu/port-upload-coordinator
feat: switch uploads to the reva upload coordinator
2026-11-13 16:57:58 +01:00
Michael Barz db7ffa7a40 Merge pull request #3899 from asaah262/feat/898-allow-setting-spaceid
feat(graph): allow client-supplied drive IDs when creating spaces
2026-11-13 16:27:29 +01:00
Pascal Bleser 51b92da2e5 fix(graph): refuse space images too large for a thumbnail
A space image is only ever shown as a thumbnail. When a file larger
than the thumbnail generator accepts was set as the image of a space,
the PATCH of the drive succeeded, but no thumbnail could be made of the
file, so the space showed no image and nobody got an error.

Before setting the image, graph now looks up the size of the file, and
refuses a file above the limit with 413 Request Entity Too Large,
without changing the space. The limit is the one of the thumbnail
generator: graph reads it under the same names as the webdav and
thumbnails services (OC_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE and the
older THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE, 50MB by default, empty for
unlimited), so one setting keeps the three in agreement.
GRAPH_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE sets a lower limit for space
images alone.

The default of 50MB is now one constant, which the graph, webdav and
thumbnails services all use.

Only the file size is checked: the dimension limits of the generator
would need the whole image to be read. The space readme has no limit,
and an empty image id is passed on unchecked, as before.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-13 15:55:12 +01:00
Andre Duffeck f314b17fce Merge pull request #3925 from opencloud-eu/chore/drop-enable-vips
drop the enable_vips build flag
2026-11-13 12:38:28 +01:00
Jörn Friedrich Dreyer 0d969c3179 thumbnails: drop the enable_vips build flag
The thumbnails service now always resizes in pure Go. Deployments that
want more formats, webp output or an attention crop run a real imagor
and point WEBDAV_THUMBNAILS_GENERATOR_URL at it. The built-in service
stays as a minimal fallback that keeps working when imagor or libvips
have to be taken out, for example during a security issue.

Without cgo dependencies the docker images link statically again and no
longer need the vips packages. The vips parity run in CI goes away, the
regular test run already covers the pure Go build.

The preview fixtures of the acceptance tests were rendered by libvips,
so they are regenerated with the pure Go build. Text previews now lose
their left edge: the 640x480 text canvas is filled into a square box
and the pure Go build crops the centre, where libvips' attention crop
kept the left side with the text.

part of https://github.com/opencloud-eu/opencloud/issues/3912

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-12 15:41:35 +01:00
Jörn Friedrich Dreyer 143a35e63d test: expect 403 when the federated share does not permit the upload
The remote instance still sees the share with the role it was created
with, so the upload coordinator refuses the upload there instead of the
owner's instance failing it with 500.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-12 11:11:30 +01:00
Pascal Bleser c3c2a8b99c fix(graph): succeed when unassigning tags a resource doesn't have
Removing a tag that the resource doesn't have failed with 400 and a
message about assigning tags ("no new tags in createtagsrequest or
maximum reached"). The tags of the resource are then already as
requested, so it now succeeds instead, without writing the unchanged
tags back.

The TagsRemoved event is published in that case too, so that the search
index drops tags that it has but the resource doesn't, which could
otherwise only be removed by assigning them first.

A request without any tags is still rejected with 400, now before
looking up the resource.

The log entries of the request now carry the requested resource id and
the tags, and a failure to store the tags logs the status of the
storage. The log message for a failed TagsRemoved event no longer calls
it TagsAdded.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-12 10:24:20 +01:00
Jörn Friedrich Dreyer f1271ef2fe test: drop the blank line padding in updateShareInvitations
The padding kept the scenario line numbers stable but trips the
newline_before_scenario gherlint rule. The three scenarios are the last
ones in the file and nothing refers to their line numbers, so they can
just move up.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-11 15:05:18 +01:00
Jörn Friedrich Dreyer 04ac120dca fix(graph): apply the role allowlist to permission updates
Updating a permission or a space root permission did not check the
roles an administrator enabled with GRAPH_AVAILABLE_ROLES. An invite
with a disabled role was rejected, but the same role could be set by
updating an existing share. We now validate updates against the
allowlist, same as invites.

The three "without enabling it" scenarios now expect a 400. Their
removed lines are padded with blank lines so the line numbers of the
scenarios stay the same.

ported from `owncloud/ocis#12540`. The reva half
(`owncloud/reva#653`) is https://github.com/opencloud-eu/reva/pull/993

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-11 13:32:56 +01:00
Jörn Friedrich Dreyer 9c7ecc1755 Merge pull request #3946 from pbleser-oc/fix/graph-reject-empty-drive-name
fix(graph): reject empty and invisible drive names on update
2026-11-11 13:31:32 +01:00
Sara Ahmadi cb3a906cb6 Merge pull request #3928 from asaah262/feat/899-get-single-sharing-permission
feat(graph): add GET endpoints for single sharing permissions
2026-11-11 12:14:42 +01:00
Jörn Friedrich Dreyer a2c24749a6 Merge branch 'main' into workpagages 2026-11-11 11:54:21 +01:00
Sara Ahmadi 64a1ac8339 feat(graph): add GET endpoints for single sharing permissions
Assisted-by: Claude Code:claude-opus-5-5
2026-11-10 18:18:01 +01:00
Pascal Bleser 0e265282d2 fix(graph): reject empty and invisible drive names on update
Updating a drive with an empty name ("name": "") succeeded and silently
kept the old name, because the name was only validated when it was
non-empty. Validate it whenever the request contains it, so an empty
name is rejected with 400 like on create. A request without a name, or
with "name": null, still leaves the name unchanged.

Space names were trimmed with strings.TrimSpace, which only removes
Unicode whitespace. Invisible formatting characters such as the
zero-width space (U+200B), the word joiner (U+2060) or the byte order
mark (U+FEFF) aren't whitespace, so a name made only of them was
accepted on create and on update, and showed up as an empty name in
every client. Trim these characters from both ends of the name as
well. Inside a name they are still allowed, since some of them are
needed there, e.g. the zero-width joiner in emoji sequences.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-10 17:16:37 +01:00
Christian Richter 25534bb010 test(acceptance): add missing blank line before scenario in sharedByMe.feature 2026-11-10 14:38:07 +01:00
Roman Perekhod 1e9919f9ae fix: Fix space root handling in a graph sharedByMe
The drive item name was derived from the resource path. Space roots
have no path ("."), so e.g. the sharedByMe response reported "." as
the name of a shared project space. Use the name provided by the
storage provider and fall back to the base of the path if it is empty.

Adjust the sharedByMe acceptance scenario for link shares of a
project space accordingly: the space root item now carries the name of
the space.
2026-11-10 14:16:07 +01:00
Sara Ahmadi 5ea6b25e22 feat(graph): allow client-supplied drive IDs when creating spaces 2026-11-10 13:41:51 +01:00
Dominik Schmidt 44ef380168 fix(proxy): allow blob: in media-src for motion and live photo playback 2026-11-04 12:14:54 +01:00
Viktor Scharf a3b27e0856 chore: bump web to v8.2.0 (#3816) 2026-10-26 17:11:14 +01:00
Jörn Friedrich Dreyer a0ae8344d5 Merge pull request #3787 from fschade/feat-search-query-filter
feat(search): configurable query filter, leaves the personal space root and .space out by default
2026-10-23 16:48:38 +02:00
Viktor Scharf 4e318264ee tests: add acceptance tests for renewing guest links (#3753)
* tests: add acceptance tests for renewing guest links

Cover renewing a guest link with and without a session, the PIN, rate limiting and the expiry of the session and the PIN.

* tests: replay used PIN with its nonce in PIN-once scenario
2026-10-23 14:32:46 +02:00
Florian Schade 385062271d feat(search): turn the query filter into a template 2026-10-22 22:46:06 +02:00
Florian Schade 3fe11ea60a feat(search): configurable query filter 2026-10-22 20:05:31 +02:00
Dominik Schmidt 8a80d75363 refactor(webdav): keep ignoring the legacy a flag
OpenCloud never honored it, so clients were tested against an ignored a and honoring it now would change what they get.
2026-10-21 14:22:54 +02:00
Dominik Schmidt 16aadb4988 Merge remote-tracking branch 'origin/main' into imagor
# Conflicts:
#	tests/acceptance/expected-failures-decomposed-storage.md
#	tests/acceptance/expected-failures-posix-storage.md
2026-10-20 20:12:56 +02:00
Dominik Schmidt c6ac8748d8 refactor: name the thumbnail settings after the service, THUMBNAILS
The service is thumbnails and its released variables say so; the new ones said THUMBNAIL. None of them has shipped yet, so they are renamed rather than aliased. The input file size gains the shared OC_THUMBNAILS_ name, because webdav and the generator have to agree on it.
2026-10-20 18:08:34 +02:00
Alex Ababii 3d0706ad4f Merge pull request #3758 from maki5/feat/guestlinks_space_share
guestlinks: auth-guest service is handling space shared events
2026-10-20 10:20:34 +02:00
Viktor Scharf d0958f04c2 tests: check that a guest can only access the shared resource (#3752)
Make sure the guest session gives no access outside of the shared folder.
2026-10-19 20:55:29 +02:00
Alex Ababii 80d64ea92b feat(guestauth): remove tests from expected failures 2026-10-19 15:48:15 +02:00
Dominik Schmidt 3572410fc4 fix: answer the review, and read imagor's path the way imagor does
The push endpoint takes an empty filters segment, ignores an image key behind the box and computes a side given as 0 from the other one, all measured against both imagors and pinned in the parity suite. Plus the review leftovers: no em dashes, the request test on ginkgo, comments that contradicted the code, one stat for Head and generate, one thumbnail handler, the gif fit-in rounding of vips, and the new env names last so they win.
2026-10-19 14:57:35 +02:00
Dominik Schmidt f4792a0b02 fix(webdav): keep the acceptance contract for previews
An explicit x=0 or y=0 is an error again, only an omitted axis is unconstrained, and the text preview fixtures carry the resolution the generator writes now.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 70002306a8 docs: describe the push endpoint and the preview settings as they are
The fixtures are named after what they are, and the leftovers of the
deleted grpc service are gone.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 95fcc4c623 fix(webdav): snap each thumbnail axis onto a ladder of edge lengths
Each axis is rounded up on its own, so a square request can no longer land
in a landscape box, and the cache is keyed on the snapped box.
2026-10-19 14:57:35 +02:00
Jörn Friedrich Dreyer 81d0a86c35 refactor(webdav): drive the thumbnail workflow via the push-based generator
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-10-19 14:57:35 +02:00
Viktor Scharf 8517f84ea3 tests: add acceptance tests for sharing with guests via email (#3751)
Share resources with an email address via the sharingNg API and access them with the guest link from the email.
2026-10-19 11:39:48 +02:00
Florian Schade a4cf381fbb test(collaboration): expect ReadOnly in read-only and view-only sessions 2026-10-15 15:37:12 +02:00
micbar 518e50e8a3 fix: change the wording 2026-10-14 16:01:30 +02:00
micbar 5ce3fc371a test: changed behavior 2026-10-14 15:11:58 +02:00
Michael Barz 4e251fac48 Merge pull request #3713 from opencloud-eu/bump-reva
chore: bump reva to latest main
2026-10-14 10:17:18 +02:00