-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Listing user's media doesn't list just user's media #11858
Comments
Do you have any more information? |
What event should I be looking for? I'm having a difficult time searching the log since debug prints so much. |
I'm sorry, I can't find the query, but all the media that doesn't belong to the account seems to have an id starting with a date. |
That ist strange.
The request from admin API to list users' media can you find with |
Thanks, I found it. The query seems to be correct |
Ok. That are preview URLs created with synapse/synapse/rest/media/v1/preview_url_resource.py Lines 495 to 502 in 807efd2
This should probably be documented somewhere. |
But it assigning them to random local users who didn't post the link seem like a bug |
IMO it is not a bug. The user/sender who posts the link, posts only a (text) link, not an image. If your server has preview URLs enabled (what the sender does not know), the recipient (requests) download(s) the image. That is the reason whe the recipient becomes the owner of the image. |
Ok, I understand. It still makes administration quite confusing though. Maybe adding an option to the API to exclude url previews might be good idea. |
Description
I'm fairly certain that admin API for listing all media of a user lists media from all the rooms the user is in instead, because listing mine shows a ton of media that I never uploaded.
Steps to reproduce
curl --header "Authorization: Bearer <token>" "http://localhost:8008/_synapse/admin/v1/users/@myaccount:foo.bar/media?dir=b&from=0&limit=50&order_by=created_ts"
Version information
Synapse 1.51.0 on Ubuntu 20.04.3 install with from the deb repo
The text was updated successfully, but these errors were encountered: