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.
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.
The audit log tests read the audit records from a copy of the server
output, which the CI wrote with "| tee" to a file given to the tests in
AUDIT_RECORDS_FILE. The ocwrapper reads the server output anyway: it now
keeps the audit records, and returns them on GET /audit (DELETE /audit
clears them). The tests clear them when a scenario starts and fetch them
from there, so they need no extra setup in the CI or locally.
Assisted-by: Claude Code:claude-opus-5-5
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
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>
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>
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
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
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
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
AI coding agents read AGENTS.md (Claude Code through CLAUDE.md) for the
conventions of a repository. Start it with the ones for configuration
options, which are easy to miss: the OC_ prefix only for environment
variables shared by several services, the service name as the prefix
otherwise, both names for shared settings that a service may override,
and the desc and introductionVersion tags, with the %%NEXT%% placeholder
for new options.
Assisted-by: Claude Code:claude-opus-5-5
* test: acceptance tests for the audit log
Assisted-by: Claude Code:claude-opus-5-5
* test: author tag in the audit context
Assisted-by: Claude Code:claude-opus-5-5
* test: wait for the share sync in the Given steps that create shares
Shares are synced (auto-accepted) asynchronously by the sharing service,
so the scenarios waited for it with "user ... has a share ... synced"
after each share. Where they didn't, the following steps could race with
it, e.g. a hide sent before the auto-accept was overwritten by it.
The Given steps that create user and group shares now wait until the
share is synced for each user it was sent to (the members of a group),
unless the user has auto-sync turned off. The "has a share ... synced"
steps that only followed such a Given step are removed, and the line
references of the expected failures are updated.
Assisted-by: Claude Code:claude-opus-5-5
* test: don't wait for the sync of a share with the role Denied
A share with the role Denied gives no access, so it never shows up in
the shared-with-me list of the sharee, and the wait for its sync timed
out.
Assisted-by: Claude Code:claude-opus-5-5
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
PUT /unpack/preset/thumbnail answers 404 unless the thumbnail catalog preset is
active, and the thumbnailer then finds no thumbnail for any document.
TIKA_PRESETS=thumbnail activates it and needs Tika 4.2.0, so the acceptance
stack and the example deployment follow the snapshot image until the release is
out. The deployment also reads the shared OC_TIKA_URL so the thumbnailer uses
the Tika that is already there.