Commit Graph
4688 Commits
Author SHA1 Message Date
Dominik Schmidt 75893c19ee refactor(thumbnails): thread context.Context through the preprocessor Convert interface
The Tika preview extractor does a network call; it was using context.Background().
Pass the request context from the gRPC handler through Convert so the unpack call
respects cancellation and deadlines. Non-I/O decoders ignore the context.
2026-08-19 18:45:11 +02:00
Dominik Schmidt c286f771c9 fix(thumbnails): use the %%NEXT%% introductionVersion placeholder the CI check requires 2026-08-19 18:40:32 +02:00
Dominik Schmidt 73b839f120 test(thumbnails): route httptest writes through a helper to satisfy codacy 2026-08-19 18:37:34 +02:00
Dominik Schmidt afd82fba5b chore: share the Tika URL via OC_TIKA_URL across search and thumbnails 2026-08-19 18:22:19 +02:00
Dominik Schmidt 63582cb310 fix(thumbnails): pass source filename so Tika selects its raw parser
Tika sniffs TIFF-based raws (NEF/DNG/ARW/PEF) as generic image/tiff by
content; only the filename extension routes them to the raw parser. Thread
the source name through to the unpack request via Content-Disposition.
2026-08-19 18:22:19 +02:00
Dominik Schmidt 7bdbad3319 feat(thumbnails): extract raw previews via Tika instead of in process
Replace the in-process TIFF/BigTIFF walker (rawtiff.go) with a Tika-based
extractor: raw images are sent to a Tika server's /unpack endpoint, which
returns the embedded JPEG previews (Tika's RawTiffParser emits them as embedded
documents). The largest renderable JPEG is decoded through the image pipeline.

This aligns preview extraction with the search service (same Tika, same format
coverage) and drops a large hand-rolled parser. Raw thumbnails now require
THUMBNAILS_TIKA_TIKA_URL; without it, raw types fall back to the default decoder
(no thumbnail).

Audio artwork extraction stays in process for now and moves in a follow-up.
2026-08-19 16:30:29 +02:00
Dominik Schmidt 882325c512 fix(thumbnails): follow SubIFDs pointers typed IFD/IFD8
isLongType accepted only LONG/LONG8, so a SubIFDs entry using the dedicated
IFD (13) or, in BigTIFF, IFD8 (18) pointer type (both standards-compliant and
common) was skipped and its embedded preview never discovered. Accept those
pointer types for the SubIFDs tag via isSubIFDType, keeping the stricter
isLongType on length fields so they never accept a pointer type. IFD8 reads at
8-byte width like LONG8.
2026-08-19 11:54:06 +02:00
Dominik Schmidt b5e1222ec8 fix(thumbnails): overflow-safe BigTIFF bounds and correct LONG offset width
Review of #3332 surfaced two BigTIFF-only defects in the embedded-preview
walker (attacker-controlled input):

- 64-bit IFD and SubIFD-array offsets were bounds-checked with `off + n > len`,
  which wraps for a crafted offset near 2^64, bypassing the guard and slicing
  out of range -> panic (recovered by the framework into a 500 + stack log on
  every crafted request, defeating the no-panic goal). Now overflow-safe.
- a tag value was always read as an 8-byte Uint64 in BigTIFF; a LONG (4-byte)
  offset in a big-endian BigTIFF was thereby shifted. Read it at its declared
  type width instead.

Adds tests for the overflow paths (assert ErrNoImageFromRawFile, no panic),
the big-endian LONG offset, and strengthens the truncation test to assert the
error. Trims a few over-long comments.
2026-08-19 11:24:50 +02:00
Dominik Schmidt 47a7136c46 feat(thumbnails): support BigTIFF containers for raw previews (DNG 1.7) 2026-08-19 07:30:53 +02:00
Dominik Schmidt 83c1dc8d49 docs(thumbnails): drop the pending-reva nrw note 2026-08-18 21:12:41 +02:00
Dominik Schmidt 6ade518690 test(thumbnails): expand raw preview coverage and quiet previewless logging
Add big-endian, largest-candidate, orientation-direction, isRenderableJPEG
classification and maxPreviewLength tests plus a ForType raw-dispatch check;
log a raw file without an embedded preview at debug instead of error; name the
TIFF magic constant and de-enumerate the decoder doc comment.
2026-08-18 16:48:32 +02:00
Dominik Schmidt 8dec34dbd4 fix(thumbnails): cap the served raw preview length
Reject a preview whose declared length exceeds 100MB rather than serving it;
previews are camera-generated JPEGs, so this bounds the output independently
of the input file size.
2026-08-18 16:48:32 +02:00
Dominik Schmidt f112e8bfb2 feat(thumbnails): register Nikon NRW and Sony SRF raw previews
Both are TIFF-based camera raw formats handled by the same generic walker;
NRW detection needs the reva mimetype mapping in opencloud-eu/reva#773, SRF is
already mapped. No sample files on hand for these two, added by format
structure alongside their verified siblings.
2026-08-18 16:48:32 +02:00
Dominik Schmidt 61ce147205 fix(thumbnails): harden the raw tiff walker against crafted files
Cap the IFD queue at maxIFDs so a file packed with huge SubIFD counts can no
longer grow it without bound, and walk the embedded JPEG by a bounded number
of header segments so a preview whose SOF sits past 64KB of leading metadata
is still found instead of being scanned only within a fixed byte window.
2026-08-18 16:48:32 +02:00
Dominik Schmidt 77b08abfb6 docs(thumbnails): list raw formats as thumbnail sources 2026-08-18 16:48:32 +02:00
Dominik Schmidt b02d4fb279 chore(thumbnails): gofmt 2026-08-18 16:48:32 +02:00
Dominik Schmidt 9805f65136 chore(thumbnails): tighten rawtiff comments 2026-08-18 16:48:32 +02:00
Dominik Schmidt 5b26d202b5 feat(thumbnails): serve raw previews for CR2, PEF, ARW, SR2 and DNG
Rename RawImageDecoder to RawTiffDecoder and qualify candidates by their
actual stream instead of trusting the tags: CR2 keeps its full-size JPEG
as an IFD0 strip, DNG stores the raw sensor payload as lossless JPEG
(SOF3) which starts with a regular SOI. A JPEG segment walk to the SOF
marker accepts only the DCT processes common decoders render.
2026-08-18 16:48:32 +02:00
Dominik Schmidt c0069c9e77 feat(thumbnails): serve the embedded jpeg preview of nikon raw files 2026-08-18 16:48:31 +02:00
André Duffeck 6a9ffd6842 Switch to Ginkgo tests for readability 2026-08-18 11:26:23 +02:00
André Duffeck 701276bc80 Make sure to scope updates to the index by space 2026-08-18 10:54:24 +02:00
Alex a3c7b2dbb3 feat: update space template image (#3324)
* feat: update space template image

* skip test

* reduce asset size
2026-08-18 09:14:20 +02:00
opencloudeu 7130c10ef3 [tx] updated from transifex 2026-08-17 23:19:38 +00:00
Florian Schade 26bd26f998 build(deps): bump github.com/opencloud-eu/libre-graph-api-go to 387da64db0b1 2026-08-17 12:29:18 +02:00
opencloudeu 7243c922ef [tx] updated from transifex 2026-08-16 23:17:02 +00:00
opencloudeu 2e912d233a [tx] updated from transifex 2026-08-14 23:17:03 +00:00
Jannik Stehle 4e0cd4038e feat(web): add rclone-crypt to default apps
Enable the rclone-crypt app per default for the upcoming release.
2026-08-14 14:42:45 +02:00
Thomas Schweiger 1fa8950571 Merge pull request #3229 from opencloud-eu/favourite-sse-event 2026-08-14 13:00:30 +02:00
Thomas Schweiger 9a9443fe85 enhance: send events for adding/removing favorite items 2026-08-14 10:16:57 +02:00
Alex b2cf7a965f fix(csp): allow blob: in style-src for EPUB reader iframe (#3300) 2026-08-13 13:16:04 +02:00
Jörn Friedrich Dreyer 8478b5daa1 allow tuning the proxies http client
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-08-13 11:54:42 +02:00
Pascal Bleser 331f78eb43 feat(nats): enable the NATS monitoring HTTP endpoint in the embedded NATS server
* add configuration options to enable the NATS server HTTP monitoring
   endpoint:
   - NATS_MONITORING_ENABLED (defaults to false)
   - NATS_MONITORING_HTTP_HOST (defaults to 127.0.0.1)
   - NATS_MONITORING_HTTP_PORT (defaults to 8222)
   - NATS_MONITORING_ENABLE_TLS (defaults to false)

Fixes #3294
2026-08-13 11:46:53 +02:00
Jörn Friedrich Dreyer 6f5f993ada Merge pull request #3288 from fschade/feat-modernize-opa
perf(policies): reuse the compiled rego query across evaluations
2026-08-12 17:58:13 +02:00
Florian Schade 1e7cfaf92d refactor(policies): read the rego policies once at startup 2026-08-12 17:01:49 +02:00
opencloudeu 716922f76f [tx] updated from transifex 2026-08-11 23:17:55 +00:00
Florian Schade cd7f8f91b6 fix: oidc middleware claim race 2026-08-11 11:39:50 +02:00
opencloudeu 8504e29743 [tx] updated from transifex 2026-08-10 23:17:14 +00:00
opencloudeu 3a3cba602c [tx] updated from transifex 2026-08-08 23:16:53 +00:00
Jannik Stehle 07fd041efb feat(web): add yjsServerUrl config
This config specifies a URL for a yjs server that is used for document
collaboration in web apps (e.g. tiptap editor, excalidraw, ...). It's
optional, not setting this disables this feature in Web.
2026-08-06 13:37:54 +02:00
André Duffeck 2142894cba Fix missing favorite flag on opensearch hits 2026-08-05 18:43:13 +02:00
Viktor Scharf 553c85b7ff set introduction version 7.4.0 (#3234) 2026-08-03 20:07:23 +02:00
Viktor Scharf 19e44f9b64 [full-ci] chore: bump web to v7.3.0 (#3223)
* chore: bump web to v7.3.0

* Update WEB_COMMITID in .woodpecker.env
2026-08-03 19:58:05 +02:00
Ralf Haferkamp 0fd02c5ecf chore(idp): bump dependencies 2026-08-03 13:20:03 +02:00
André Duffeck 2eb1fe069c Add a --concurrency flag to the index command
It controls the number of spaces that are indexed in parallel. The max
concurrency configured in the server is still considered.
2026-07-31 16:07:18 +02:00
André Duffeck a82b6223aa Remove the SilenceUsage flag again
It will be obsolete once #3140 has been merged
2026-07-31 15:55:36 +02:00
André Duffeck e26a009fc1 Improve "opencloud search index" command
The command no longer times out after 10 minutes when the processing
hasn't been finished yet. Instead it shows progress and logs successful
and failed spaces. The process can also be aborted using ctrl+c.

Example output:

```
$ bin/opencloud search index --all-spaces --insecure --force-rescan
[1/602] indexed space a9033d65-6c13-4556-b923-f321ab33a9ca$eb6a8a0e-2e62-4b40-bce9-360063236676!eb6a8a0e-2e62-4b40-bce9-360063236676 in 5.501190908s
[2/602] indexed space a9033d65-6c13-4556-b923-f321ab33a9ca$34b7c565-da3b-4f53-8559-825e87db4011!34b7c565-da3b-4f53-8559-825e87db4011 in 5.935075697s
[3/602] indexed space a9033d65-6c13-4556-b923-f321ab33a9ca$e08c6026-24f6-4a9e-a805-ed335b34b8da!e08c6026-24f6-4a9e-a805-ed335b34b8da in 6.016350958s
^Caborted, indexing has been stopped
```

Fixes #2592
2026-07-31 14:50:09 +02:00
André Duffeck d50d8d8900 Rename max concurrency option 2026-07-31 12:04:44 +02:00
André Duffeck 243514ec17 Do not abort reindexing all spaces if one of the spaces fails 2026-07-30 15:34:57 +02:00
André Duffeck be75d8fe95 Reindex spaces concurrently
This speeds up reindexing all spaces which happend sequentially space
after space until now. The level of concurrency can be configured using
the SEARCH_REINDEX_CONCURRENCY env var (3 by default).
2026-07-30 15:25:13 +02:00
Dominik Schmidt bb8cefa33b Merge pull request #3189 from opencloud-eu/feat/announcement-banner
feat: add announcement banner
2026-07-30 10:44:17 +02:00