Commit Graph
24464 Commits
Author SHA1 Message Date
oauth dc604d6fb1 Merge branch 'origin/main' into 'next-release/main' 2026-11-16 17:08:03 +00:00
Sara Ahmadi d7b8a9b18d Merge pull request #4014 from asaah262/fix/905-graph-hide-private-user-attributes
fix(graph): hide private user attributes from other users
2026-11-16 18:05:26 +01:00
oauth ec53db91ce 🎉 Release 9.2.0 2026-11-16 15:26:56 +00:00
oauth 73d691bf95 Merge branch 'origin/main' into 'next-release/main' 2026-11-16 15:26:56 +00:00
Pascal Bleser b9065e2c7a Merge pull request #4009 from pbleser-oc/test/4008-fail-on-cut-off-responses
test(acceptance): fail on responses that are cut off after their headers
2026-11-16 16:24:07 +01:00
oauth ece696cb0d 🎉 Release 9.2.0 2026-11-16 12:37:05 +00:00
oauth ac965e0ec5 Merge branch 'origin/main' into 'next-release/main' 2026-11-16 12:37:04 +00:00
Alexander Ackermann 9313c7cb19 fix(markdown): create toc anchors like github-slugger
toAnchor removed every character except ASCII letters, digits and spaces,
so headings like "Read-Only" got the anchor "readonly", while GitHub and
Docusaurus create "read-only". Keep hyphens, underscores and non-ASCII
letters, and add a -1, -2, ... suffix to duplicate anchors, the same way
github-slugger does.
2026-11-16 13:34:19 +01:00
Sara Ahmadi dc891683eb fix(graph): hide private user attributes from other users
Assisted-by: Claude Code:claude-opus-5-5
2026-11-16 13:03:58 +01:00
Pascal Bleser bae276fde6 test(acceptance): fail on responses that are cut off after their headers
When the transfer of a response broke off after its headers, e.g.
because the server aborted it, sendRequestOnce caught the exception and
passed the incomplete response on as if it were complete. Tests then
failed later, and misleadingly, e.g. with a JsonException on the cut-off
body, or passed when they only checked the status code.

Re-throw Guzzle's ResponseTransferException, so that such a test fails
at the request, with the transfer error (e.g. cURL error 18).

Refs #4008

Assisted-by: Claude Code:claude-opus-5-5
2026-11-16 12:01:55 +01:00
Sara Ahmadi 2ff7018524 Merge pull request #3992 from asaah262/refactor/graph-unified-role-labels
refactor(graph): keep the unified role labels in one place
2026-11-16 10:09:55 +01:00
oauth 587bfb4ce4 🎉 Release 9.2.0 2026-11-16 09:09:09 +00:00
oauth 7785f52363 Merge branch 'origin/main' into 'next-release/main' 2026-11-16 09:09:08 +00:00
Jörn Friedrich Dreyer 82aa5edd55 Merge pull request #4006 from pbleser-oc/fix/3997-remote-item-drive-id
fix(graph): return the drive id in remoteItem.parentReference.driveId
2026-11-16 10:06:23 +01:00
Pascal Bleser 5853b9b598 fix(graph): return the drive id in remoteItem.parentReference.driveId
For received shares, remoteItem.parentReference.driveId held the id of
the root item of the drive (<storage>$<space>!<root>) instead of the id
of the drive (<storage>$<space>), unlike all other drive items. Clients
had to cut off the root part themselves to request /drives/{drive-id}.

Use the drive id for user and OCM shares, and expect it in the
acceptance tests of the shared with me listing.

Fixes #3997

Assisted-by: Claude Code:claude-opus-5-5
2026-11-16 09:33:47 +01:00
oauth 79dd8aefd6 🎉 Release 9.2.0 2026-11-16 07:46:26 +00:00
oauth 02ace01e46 Merge branch 'origin/main' into 'next-release/main' 2026-11-16 07:46:25 +00:00
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
oauth 1f514ce7a7 🎉 Release 9.2.0 2026-11-16 07:31:31 +00:00
oauth 60d1e100bb Merge branch 'origin/main' into 'next-release/main' 2026-11-16 07:31:30 +00: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
oauth 15e9521393 🎉 Release 9.2.0 2026-11-15 14:56:00 +00:00
oauth 623b0ce7b7 Merge branch 'origin/main' into 'next-release/main' 2026-11-15 14:55:58 +00:00
Pascal Bleser 9856b448ff fix(ci): skip the font regeneration that restarts OnlyOffice (#3996)
The entrypoint of the OnlyOffice image regenerates the fonts after the
document server first started, and restarts it about 30 s later. The
wait step only sees the first instance, and the collaboration service
fetches the WOPI discovery once at startup: when that fetch hits the
restart, it gets a 502, registers without mimetypes, and every
OnlyOffice app-open fails until its next registration 30 s later.

The image comes with the fonts already generated, so skip the
regeneration with GENERATE_FONTS=false.

Fixes #3994

Assisted-by: Claude Code:claude-opus-5-5
2026-11-15 15:53:04 +01:00
opencloudeu 15d181d3f4 [tx] updated from transifex 2026-11-13 23:17:01 +00:00
oauth 2fac41cde0 🎉 Release 9.2.0 2026-11-13 21:55:21 +00:00
oauth 89dbd2724f Merge branch 'origin/main' into 'next-release/main' 2026-11-13 21:55:19 +00: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
oauth 19ba2cff48 🎉 Release 9.2.0 2026-11-13 19:40:26 +00:00
oauth 42d2ce9017 Merge branch 'origin/main' into 'next-release/main' 2026-11-13 19:40:25 +00: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
oauth f7c8c84579 🎉 Release 9.2.0 2026-11-13 19:20:09 +00:00
oauth b75ab410da Merge branch 'origin/main' into 'next-release/main' 2026-11-13 19:20:08 +00:00
Jörn Friedrich Dreyer 8ba2c3c581 Merge pull request #3973 from pbleser-oc/feat/graph-export-personal-data-rate-limit
graph: rate limit the personal data export
2026-11-13 20:17:34 +01:00
oauth 1e9d243780 🎉 Release 9.2.0 2026-11-13 18:47:28 +00:00
oauth ad2bf80c18 Merge branch 'origin/main' into 'next-release/main' 2026-11-13 18:47:27 +00:00
Michael Barz 309f9d643b Merge pull request #3941 from pbleser-oc/feat/graph-drive-v1beta1-aliases
feat(graph): add the v1beta1 endpoints for a single drive
2026-11-13 19:44:10 +01:00
Pascal Bleser dd93fd4d43 docs(graph): mention the v1beta1 route for space images
A space image can be assigned with a PATCH of the drive on the v1beta1
route as well, and the size limit applies there the same way. Say so in
the README, and cover the refusal of a too large image on that route in
the tests.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-13 19:15:45 +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
oauth fdf1186774 🎉 Release 9.2.0 2026-11-13 17:53:05 +00:00
oauth 3e41f5e5a2 Merge branch 'origin/main' into 'next-release/main' 2026-11-13 17:53:05 +00: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
oauth 89a358a0f7 🎉 Release 9.2.0 2026-11-13 17:31:23 +00:00
oauth 80839c2819 Merge branch 'origin/main' into 'next-release/main' 2026-11-13 17:31:22 +00: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
Pascal Bleser 0169f3b0a5 graph: answer the export rate limit in the graph error format
A request to export the personal data beyond the rate limit got the
plain text 429 of httprate, while the other errors of graph, also those
of the same route, are JSON with an error code.

RateLimitPerAuthenticatedUser takes a handler for the response beyond
the limit now, so that a service can answer in its own format; nil
keeps the plain text 429. Graph answers with activityLimitReached. The
Retry-After header is set before the handler is called, so it stays.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-13 18:25:47 +01:00
Pascal Bleser a7789f8462 graph: rate limit the personal data export
Each personal data export collects all events of the user and writes
them into the user's personal space, so starting exports over and over
puts load on the system. Limit how many exports a user can start to 5
per minute, configurable with GRAPH_EXPORT_PERSONAL_DATA_RATE_LIMIT
(0 disables the limit). Requests beyond it get a 429 with a
Retry-After header.

The limit uses a new middleware, RateLimitPerAuthenticatedUser. It
counts requests by the id of the authenticated user rather than by the
URL, so that variations of the URL, such as a trailing slash, can't get
around it. It comes after the check that users only export their own
data, so that requests for other users don't count against any limit.
The counters are kept in memory by every instance of the graph service.

This adds the dependency github.com/go-chi/httprate v0.16.1 (MIT), from
the authors of the chi router that the service already uses. It is used
instead of a limiter of our own, because counting requests in sliding
time windows correctly under concurrency is easy to get wrong, and the
library is maintained and tested for exactly that. It brings no further
modules: the two it needs are already required. There are no known
vulnerabilities in it, and govulncheck reports none.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-13 18:25:47 +01:00
Pascal Bleser b257a651ee graph: check the user id of exportPersonalData in a middleware
Check that a user exports only their own personal data in a new
middleware, RequireOwnUserID, so that the check can run before other
middlewares on the route, such as a rate limit. The route passes the
name of its user id parameter to it.

The handler keeps its own check as well, as a safety net: exporting the
data of one user to another must never happen, also when the route is
changed by mistake. When that check catches a request, it logs an error,
since the middleware must be missing.

Both unescape the user id from the path, like the other handlers of the
users endpoint do, and reject an empty one. The middleware answers 401
when there is no authenticated user. Requests for other users still get
a 400, now with a JSON error body instead of a plain text one.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-13 18:25:17 +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