Commit Graph
5543 Commits
Author SHA1 Message Date
Dominik Schmidt 0ac1ea8e30 fix(webdav): trim the Tika thumbnail preset once in Sanitize
The check trimmed the preset but the URL took it untrimmed, so " thumbnail"
started fine and then answered 404 for /unpack/preset/%20thumbnail. Sanitize
trims it now and Validate only compares against "". The tests build their
Tika through a helper that sets the default preset.
2026-12-02 16:43:53 +01:00
Dominik Schmidt 17a9874be2 feat(webdav): make the Tika thumbnail preset configurable
OC_TIKA_THUMBNAIL_PRESET (WEBDAV_TIKA_THUMBNAIL_PRESET) names the catalog
preset webdav unpacks thumbnails with, "thumbnail" by default. A preset of
your own has to bring the same filter, only the raster images Tika marks as
THUMBNAIL or RENDERING, since webdav takes the first image in the answer.
An empty preset fails at startup.

Changing the preset needs the thumbnail cache emptied, as a Tika upgrade
does.
2026-12-02 16:22:19 +01:00
Dominik Schmidt e6acfb721d Merge pull request #3332 from opencloud-eu/feat/thumbnails-raw-embedded-preview
feat(webdav): extract thumbnails through Tika
2026-12-02 12:13:30 +01:00
Ralf Haferkamp 3f25437ae5 Merge pull request #3477 from zerox80/codex/oidc-session-logout
fix(proxy): reject tokens covered by a backchannel logout
2026-12-02 09:21:54 +01:00
opencloudeu 10da3b6701 [tx] updated from transifex 2026-12-01 23:16:26 +00:00
Alex 25b7c7cc88 fix(collaboration): use the edit action for Collabora in read/write mode (#4178) 2026-12-01 16:52:03 +01:00
Alex Ababii d0b0da9d66 Merge pull request #3795 from maki5/feat/guestlinks_pin_flag
feat(authguest): respond with pin true/false in renewal endpoint
2026-12-01 14:51:36 +01:00
Dominik Schmidt 492412ca56 Merge pull request #3835 from opencloud-eu/refactor/search-engine-ast
refactor(search): hand the engines the parsed query
2026-12-01 14:48:06 +01:00
Pascal Bleser 64a44e77ff chore(graph): log the resource and the tags in AssignTags (#4156)
UnassignTags logs with a sublogger that carries the request ID, the
resource ID and the tags of the request, AssignTags still used the
plain service logger. Use the same sublogger in AssignTags, so that the
log lines of both handlers can be found by the same fields.

Also drop the error from the "no permissionset on file" line: err is
always nil there.

Assisted-by: Claude Code:claude-opus-5-5
2026-12-01 12:59:32 +01:00
Jörn Friedrich Dreyer 4f2ab613a2 Merge pull request #3903 from opencloud-eu/feat/policies-request-length
feat(policies): pass request lengths to the proxy policies
2026-11-30 15:27:36 +01:00
Jörn Friedrich Dreyer 15ad13be2f docs(policies): do not blame concatenation for the postprocessing check
The README claimed that the TUS concatenation extension can merge
several smaller uploads into one file. The posix and decomposed drivers
cannot do that: tusd creates the final upload with NewUpload, which
they do not implement, because uploads have to be started with
InitiateUpload via ocdav.

Checking the actual size in postprocessing is still useful as a safety
net, the early check only sees what the client declares.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-30 12:35:19 +01:00
Jörn Friedrich Dreyer a69677cecf feat(policies): leave unknown request lengths out of the policy input
content_length was 0 both for an empty body and for a body of unknown
length, e.g. a PUT with chunked transfer encoding. A policy could not
reject uploads that do not declare their size.

The lengths are now proto3 optional fields and the proxy sets
content_length whenever Go knows it, including 0 for an empty body.
An unknown length leaves the key out of the policy input. Rules that
compare a missing key do not apply, so existing limit rules keep
working, and a policy can reject an undeclared length explicitly with
`not "content_length" in object.keys(input.request)`.

We use field presence instead of -1, because a negative sentinel would
turn a request without lengths, e.g. in the postprocessing stage, into
an empty body.

related: https://github.com/opencloud-eu/opencloud/pull/3903#issuecomment-7273785513

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-30 12:31:02 +01:00
zerox80 06220c591f Merge branch 'main' into codex/oidc-session-logout
main moved the audit login records into a store of their own. Both sides
add an option to the OIDC authenticator, keep both.

Assisted-by: Claude Code:Claude Mythos 5.2
2026-11-30 10:31:05 +00:00
zerox80 23197a969c test(proxy): cover the audit log together with the logout markers
The merge with main had to decide two things about the audit log that no test
described yet:

- A backchannel logout is audited even if the cached claims cannot be removed
  afterwards, because the marker has ended the session by then.
- A token that a logout marker rejects is audited as a failed login. Only a
  token that failed its time validation is left out, as before.

Assisted-by: Claude Code:Claude Mythos 5.2
2026-11-30 10:25:52 +00:00
zerox80 ef56f57c50 docs(proxy): correct the retention of logout markers on nats-js-kv
The README said that an existing bucket of the markers keeps its retention
when PROXY_OIDC_MAX_ACCESS_TOKEN_LIFETIME is changed. The store updates the
bucket at every start, so the new value also applies to markers that already
exist. Say so, and that the lifetime should only be lowered once the tokens
with the longer lifetime have expired.

The section on the backchannel logout was placed in the middle of the notes
on the cache stores. It now follows them.

Assisted-by: Claude Code:Claude Mythos 5.2
2026-11-30 10:25:52 +00:00
zerox80 b945a94532 Merge branch 'main' into codex/oidc-session-logout
main brought the audit log and reva v3. Besides the textual conflicts, some
code of both sides no longer fits together and is adapted here:

- newOIDCAuthenticator and loadMiddlewares take the logout markers and the
  audit emitter.
- The backchannel logout handler still writes the marker first. The logout is
  audited once the user is resolved, whether or not the cached claims can be
  removed afterwards, because the marker has ended the session by then.
- userForClaimKey reads the cached TokenRecord instead of a plain claims map.
- isExpectedTokenTimeError stays, because the audit log uses it to leave out
  expired tokens. A token rejected by a logout marker is still audited as a
  failed login, isExpectedTokenError only keeps it out of the error log.
- The audit test of the handler gets logout markers, an iat in the logout
  token and the new format of the cached record.
- The middleware test of the command package passes no markers.
- The logout tests import the events of reva v3.

Assisted-by: Claude Code:Claude Mythos 5.2
2026-11-30 10:25:52 +00:00
Dominik Schmidt d6077ece93 feat(clientlog): send item-metadata-changed over SSE 2026-11-30 09:46:21 +01:00
Dominik Schmidt 73da277d74 fix(search): reject a scope that is negated or joined with OR
A scope narrows the whole search to one folder. NOT scope: searched
inside the folder instead of outside it, and OR scope: was treated as
AND. Both are a 400 now.
2026-11-27 17:28:24 +01:00
Dominik Schmidt ef53745b04 test(search): cover an implicitly joined scope at the start and in the middle 2026-11-27 17:28:15 +01:00
Dominik Schmidt 79f522c5fe fix(search): fill a repeated root placeholder everywhere, reject a repeated or grouped scope 2026-11-27 17:28:02 +01:00
Dominik Schmidt a7ad1492eb refactor(search): drop the generic Compiler interface, bleve has the one compiler 2026-11-27 17:27:53 +01:00
Dominik Schmidt d62e904f9b fix(search): reject a nested scope after a top-level one 2026-11-27 17:27:43 +01:00
Dominik Schmidt ef1ba48b41 refactor(search): validate the template on the tree and share the parse 2026-11-27 17:27:34 +01:00
Dominik Schmidt b3becdd35f refactor(search): take scope and is:favorite out of the tree instead of the text 2026-11-27 17:27:25 +01:00
Dominik Schmidt 11047abb6a refactor(search): hand the engines the parsed query
The service parsed the query once for validation and every engine parsed the
expanded string again per space. Now the service parses once and the engines
compile an AST. The query template is parsed at startup and expanded by
substituting nodes, the indexer's up-to-date check is built as nodes as well.
2026-11-27 17:27:16 +01:00
Dominik Schmidt 97c4288be8 Merge pull request #3211 from opencloud-eu/feat/graph-search-query
feat(search): graph search query endpoint with aggregations
2026-11-27 16:47:18 +01:00
Andre Duffeck 17bf7b058e Merge pull request #4151 from opencloud-eu/fix/graph-get-user-drive-unknown-user
fix(graph): look up the user drive by id when the user is unknown
2026-11-27 16:47:12 +01:00
Dominik Schmidt 4443a8f9fc fix(webdav): bound a kept source only by the cache's own limit 2026-11-27 16:40:33 +01:00
Dominik Schmidt 253b2d4d52 fix(webdav): key the source cache by extractor, keep no empty entry per size 2026-11-27 16:40:24 +01:00
Dominik Schmidt 081a0a71ec fix(webdav): hash the source cache key like the thumbnail key 2026-11-27 16:40:15 +01:00
Dominik Schmidt d27aaa403f docs(webdav): split the thumbnail README by topic, with setups as a table 2026-11-27 16:40:05 +01:00
Dominik Schmidt 3716c65704 fix(webdav): cache a file the built-in extractors find no image in, as for Tika 2026-11-27 16:39:56 +01:00
Dominik Schmidt 82735a337d fix(webdav): give every thumbnail type exactly one taker
A named Tika type goes to Tika, then the built-in converters, then images
to the generator, then the rest to Tika under "*" or to the generator.
"*" never sends an image, which only moved the file to come back empty,
and an announced type without a converter reaches the generator again, as
it does on main since the generator pass-through.
2026-11-27 16:39:43 +01:00
Dominik Schmidt d326bbd54f fix(webdav): send m4b audiobooks to Tika for their cover 2026-11-27 16:39:34 +01:00
Dominik Schmidt f2a15e9434 docs: correct what an empty Tika type list does, and couple the two ceilings in writing
The description said an empty list leaves the built-in list in place, which is
what an unset variable does; an explicitly empty one sends nothing. And a ladder
that reaches past the generator's output ceiling asks for a box the generator
refuses, which nothing checks for us, so the thumbnails README says it.
2026-11-27 16:39:23 +01:00
Dominik Schmidt ff964dcc22 refactor(webdav): ask who can serve a type, not what the type is called
ForType decided by the name of the type: anything starting with image/ was
handed to the generator, and no converter meant handing it over as well. A
camera raw is an image by that rule, so it travelled to a generator that cannot
read it, and an announced pdf travelled there too. It now asks in one order who
claims the file: a type the Tika list names, an image the generator reads, a
converter here, a catch-all, and otherwise nobody, which answers 404 before the
file is read at all.

The Tika list carries the formats a release serves a thumbnail for, the camera
raws among them, and the default config hands it in, so an empty list still
means nothing goes to Tika and a shared server stays the search service's.
OC_TIKA_ADDITIONAL_THUMBNAIL_MIME_TYPES adds to it.
2026-11-27 16:39:10 +01:00
Dominik Schmidt 92dab13caa docs(webdav): say what the Tika type hint is for
The type decides which parser reads the file, so a raw photo that Tika only detected as a plain tiff is parsed as a tiff and its embedded preview is never found. No shipped format needs the hint, which is why the knob reads like dead code and has to say that it is not.
2026-11-27 16:38:57 +01:00
Dominik Schmidt f24659fdf4 refactor(webdav): keep the Tika type default in the default config
The catch-all was hidden in NewTika, so neither the yaml nor the env documentation showed it. It is a plain default now, like the CORS origins, and an empty list means what it says: nothing goes to Tika, and the server behind OC_TIKA_URL stays the search service's.
2026-11-27 16:38:44 +01:00
Dominik Schmidt 31b6cf6bd9 docs(webdav): say how a Tika before 4.2.0 activates the preset
Both answer with the same image for the same file, only the package differs, and a 4.1.x server has no preview for erf, orf and rw2. The 404 now names both ways to activate the preset.
2026-11-27 16:38:29 +01:00
Dominik Schmidt 5d98850cd9 feat(webdav): extract a source image once per file, not once per size
What an extractor makes of a file does not depend on the size that was asked
for, so it is kept under one key per file and read before the file is even
downloaded. An empty entry says the file carries nothing, which keeps the
next size from asking Tika again; a failed extraction is not remembered. The
file cache now replaces what a key holds, as the other two backends already
did, because an entry whose value can change has to be replaceable.
2026-11-27 16:38:20 +01:00
Dominik Schmidt 6b2c30219c refactor(webdav): let the preprocessor say what a type needs
The cache key is derived from configuration again: a thumbnail is written in
the type the file's own type maps to, so the answer no longer depends on what
Tika hands back and needs no placeholder in the key.

Which types Tika gets is decided in one place now. An image type goes to Tika
only when a deployment names it, because the generator behind the URL may read
it itself, which also lets a raw photo reach Tika at all.
2026-11-27 16:38:09 +01:00
Dominik Schmidt 9dbe0b7956 feat(webdav): use Tika's merged thumbnail preset
Tika merged the thumbnail catalog preset and ThumbnailUnpackSelector
(TIKA-4856): PUT /unpack/preset/thumbnail returns exactly the one raster
image a client would show for the document, a stored thumbnail, the
rendering of a metafile thumbnail, or the rendered first page. The
client-side selection over /unpack/all (embedded-resource-type marks,
metafile renderings, id-path matching) moves to the server; the preset
zip carries one image without metadata sidecars, so the entry's
extension names the type and the bytes break the tie. The preset has to
be active, so this needs a Tika 4.2.0 or newer started with
TIKA_PRESETS=thumbnail, and a 404 says so.
2026-11-27 16:37:50 +01:00
Dominik Schmidt 69e13657e4 feat(webdav): take the thumbnail tika marks, and the rendering of a metafile 2026-11-27 16:37:41 +01:00
Dominik Schmidt 48a8e882bd chore(search): read the shared OC_TIKA_URL 2026-11-27 16:37:30 +01:00
Dominik Schmidt 1c7b19f009 feat(webdav): thumbnails through a Tika server
Every file the built-in converters cannot render goes to /unpack/thumbnail
(Tika 4.1) and comes back with the image Tika marks as its thumbnail.
2026-11-27 16:36:39 +01:00
Dominik Schmidt 7021ce1c2b Merge pull request #3686 from opencloud-eu/feat/proxy-csp-config-globs
feat(proxy): accept lists and globs for the CSP config file locations
2026-11-27 16:20:32 +01:00
Dominik Schmidt 0a999ab89c fix(search): reject a page size below -1 and log bad requests of the engines at debug level
A page size below -1 from a direct gRPC caller ran into a slice out of range. A bad request an engine answers is the fault of the request, it was logged as an error once per space.
2026-11-27 15:53:13 +01:00
Dominik Schmidt ba01f1d0f4 test(search): pin a fractional filter key on a whole-number field
Both engines answer a term filter of 1.5 on Size with no match and no error; OpenSearch does not reject it on its long mapping.
2026-11-27 15:53:05 +01:00
Dominik Schmidt 4062029e90 fix(search): leave the result window to the engine
The search held both engines to the first 10000 matches, the default index.max_result_window of OpenSearch. Bleve has no such limit, so a WebDAV report with a limit above 10000 that bleve answered before got a 400.

The window is no longer checked by the service. Bleve answers every page again. OpenSearch refuses a page beyond its window itself, the backend turns that into a bad request instead of an internal error, so a window raised on the index takes effect without a change here. The graph endpoint no longer caps from and size or moreResultsAvailable at 10000.
2026-11-27 15:52:53 +01:00
Dominik Schmidt d5aba495ee docs(search): describe what paging and counts promise
Pages are stable on an unchanged index only, and a resource reachable through several shares or spaces is counted once per route.
2026-11-27 15:52:46 +01:00