Repository navigation
fix(messaging): withhold push image URL from callers without files.read - #15341
Conversation
The URL is a bearer capability for the file: its endpoint is public and checks only the token. The create and update gates required files.read, but the read routes, and the email and SMS update routes, which accept any message ID, returned the stored URL to any caller.
|
Review complete. 🟠 1 high · 🟡 1 medium 📍 Findings outside the diff (2) — 🟠 1 high · 🟡 1 medium — defects on lines GitHub can't attach comments to🟠 High — Redact image URL on // src/Appwrite/Platform/Modules/Messaging/Http/Messages/Push/Update.php
375 ->dynamic($message, Response::MODEL_MESSAGE);The 🟡 Medium — Redact image URL in delete event payload · Delete.php:97–99 · // src/Appwrite/Platform/Modules/Messaging/Http/Messages/Delete.php
97 $queueForEvents
98 ->setParam('messageId', $message->getId())
99 ->setPayload($response->output($message, Response::MODEL_MESSAGE));
This PR adds a shared
Reviewed commit: 62a76f7 |
🟢 Tier S · Ready to merge
Adds a shared message-response redactor that omits push image bearer URLs when the request lacks
📂 Walkthrough · 6
Reviewed |
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
…tion fix(messaging): withhold push image URL from callers without files.read (cherry picked from commit a5b3597)
data.image.urlis a bearer link: the storage endpoint behind it is public and checks only the token. Creating or updating a push image requiresfiles.read, but other routes returned the stored URL without it.files.readGET /v1/messaging/messages/:idurlreturnedbucketId,fileIdonlyGET /v1/messaging/messagesurlreturnedbucketId,fileIdonlyPATCH /v1/messaging/messages/email/:idurlreturnedbucketId,fileIdonlyPATCH /v1/messaging/messages/sms/:idurlreturnedbucketId,fileIdonlyOnly the response changes. The stored message keeps its URL, so delivery is unaffected.
Covered by extending the push image e2e test in
MessagingBase. The new assertions have not been run yet, locally or against the unfixed code.