The WOPI discovery response lists its extensions in lower case, and
OpenInApp looks them up with the extension of the file as it is on disk.
So a "report.DOCX" found no app url while a "report.docx" opened, and
the web UI reported that it could not contact the application, which
reads like the editor is down.
The extensions now go into the map in lower case and the lookup folds
the case as well, so both ends match whatever the app publishes. The log
line and the error also name the extension, because neither said which
file type had no app.
Fixesopencloud-eu/opencloud#3449
* re-add the metrics that were existing prior to this PR, to keep them
for compatibility reasons with existing Grafana panels:
- opencloud_proxy_requests_total
- opencloud_proxy_errors_total
- opencloud_proxy_duration_seconds
* renamed new metric opencloud_proxy_request_total (that contains the
service label) to opencloud_proxy_service_request_total
* renamed new metric opencloud_proxy_duration_seconds (that contains
the service label) to opencloud_proxy_service_duration_seconds
Improve the metrics for the proxy service.
* extend the instrumenter middleware to add a label with the name of
the service the request is being dispatched to
* add a native Prometheus histogram that tracks the durations and also
includes a label for the name of the service the request is being
dispatched to, as well as a 'result' label ('success',
'client-error', 'server-error') based on the HTTP status code of the
response
* add per-service gauge functions to count the number of in-flight
requests
* add a counter for routing failures, for when an inbound request
cannot be mapped to a route
* extend the route.RoutingInfo struct with a service attribute, and a
Service() getter
* remove the 'routing_failure_count' metric, as it is redundant
This makes sure that the token does not expire if the indexing process
takes longer than the token lifetime.
This commit also makes sure that the authenticated context is reused
instead of generating a new context for each resource which is much more
efficient.
* in the graph service's metrics, we use a homegrown response writer
struct implementation to capture the status of the next handler's
response: instead, use chi's implementation which is more
sophisticated and battle tested
Do not set WWW-Authenticate headers when an active signed URL
authentication attempt fails. Signed URL clients cannot respond to Basic
or Bearer challenges, and advertising them may trigger unintended
authentication prompts.
Keep returning 401 Unauthorized while preserving the existing challenge
behavior for unsigned requests and disabled signed URL mechanisms.
Path was a keyword, so the descendant lookup behind delete/move/restore/purge, the scoped search and the KQL path predicate expanded into one term searcher per descendant and OOM-killed the server on large folders (#1269, #3469).
Path is now analyzed into its ancestor prefixes, like path_hierarchy in OpenSearch: ./a/b.txt becomes ., ./a, ./a/b.txt. A folder's descendants are every document carrying the folder's path as a term, so all three call sites are a single term query. Schema 4 -> 5, v4 never shipped.
The same tokenizer with tag_depth is registered as the geohash analyzer, so #3272 can add its geohash field without another schema change.
The imaging build decodes the full pixel buffer from the header-declared
dimensions before the existing MaxInputWidth/MaxInputHeight guard runs, so a
tiny crafted file whose header declares huge dimensions forces a multi-GB
allocation and can OOM the worker. Read the header with DecodeConfig and reject
oversized sources before the decode allocates, in both the imaging and vips
builds, and thread the limit through the audio cover-art and geogebra decoders
that decode a second attacker-controlled image.
The recursive tika response lists the file first, then its embedded
resources (cover art, thumbnails, the clip appended to a motion photo).
The loop applied getImage/getPhoto/getLocation/getAudio/getLivePhoto to
every part, so an mp3's embedded cover art leaked a 200x200 image facet
onto the track (and an embedded EXIF image would leak photo/location).
Read those facets from metas[0] only, like the video facet already does;
the loop now only concatenates title/content and detects the motion
photo clip.