Problem:
The file operator, :secure share URL, returns the original, plain and unsigned URL instead of a signed one.
On a private file attached to a Thing whose “View files attached to this” rule is unchecked, the operator returns a URL identical to the file’s normal URL (no signature, no token, no expiry query parameters). I verified this by inspecting elements at runtime. If this operator is not intended to produce a shareable link, its name and the absence of documentation feel misleading.
Two related issues affecting private file access:
api_key query parameter is ignored on file routes.
GET /version-test/fileupload/<file>?api_key=<valid key> returns 401, identical to a request without it. The same URL with Authorization: Bearer <same key> succeeds. This breaks 3rd-party services that fetch a file by URL, since headers can’t be attached to an <img src>: at least one plugin today is built on the assumption that it works.
Edit: api_token works, not api_key
Private file URLs are served without CORS headers.
A logged-in user with full permission to view a file cannot read it from JavaScript: fetch fails outright, canvas marks the context tainted, and crossOrigin="use-credentials" is blocked. The browser will display the image but not let the page read it. This makes client-side embedding (e.g. converting to a data URI for PDF generation) impossible even for authorized users.
Impact:
These leave no built-in way (without plugins) to access a private file externally without making the file publicly readable through privacy rules.