Post A91MH81aEMg6g0CyPY by hermlon@mastodon.social
 (DIR) More posts by hermlon@mastodon.social
 (DIR) Post #A919kvBtDCtC9luAYC by mia@movsb.0x0.st
       2021-07-06T16:33:38.803114Z
       
       1 likes, 0 repeats
       
       can we get shorter mediaproxy URLs
       
 (DIR) Post #A919kxWWXSaDOLZfzU by mia@movsb.0x0.st
       2021-07-06T16:33:50.015023Z
       
       1 likes, 0 repeats
       
       also groups
       
 (DIR) Post #A919mBMYZPlgbRUn0S by chj0@udongein.xyz
       2021-07-06T16:35:53.654111Z
       
       0 likes, 0 repeats
       
       @mia when pleroma devs start caring about pleroma (never)
       
 (DIR) Post #A919yEszIUZ30LPjlY by rin@patch.cx
       2021-07-06T16:38:05.105536Z
       
       1 likes, 0 repeats
       
       @mia doubt it, the url is so long because it’s base64 encoded+signed origin url. what’s the problem with them?
       
 (DIR) Post #A91A9WgnRejxPF5swq by mia@movsb.0x0.st
       2021-07-06T16:39:50.247879Z
       
       1 likes, 0 repeats
       
       @rin ah just thinking it’d be nice to link stuff on irc without it breaking over 4 lines
       
 (DIR) Post #A91MH81aEMg6g0CyPY by hermlon@mastodon.social
       2021-07-06T17:55:27Z
       
       0 likes, 0 repeats
       
       @rin @mia why would one sign a media url and who would sign it anyway? This sounds interesting, but I have no idea about this at all, could you point me to where I can learn about this more? Is this an Activity Pub thing?
       
 (DIR) Post #A91MH8WQNhLeDedbU0 by rin@patch.cx
       2021-07-06T18:55:56.043194Z
       
       3 likes, 2 repeats
       
       @hermlon @mia no, not an activitypub thing, it's just pleroma implementation details.instead of downloading remote attachments pleroma has mediaproxy, which is a literal proxy with cache provided by nginx (or other reverse proxy). the way mediaproxy works is: the remote link is encoded to base64 and signed with a key unique to the instance (generated during setup), then the resulting url is served to the clients. when the client hits the link, the sig is checked, url is decoded and then the proxy part activates.the reason the url is signed is to prevent people using mediaproxy to proxy random stuff, well, it's still possible if you just send pleroma an activitypub object with the link you want proxied in the attachment, but it's harder.you can read the code if you want more info, or ask me:https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/web/media_proxy.exhttps://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/web/media_proxy/media_proxy_controller.exhttps://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/reverse_proxy.ex
       
 (DIR) Post #A950inivshrJSo79Tk by hermlon@mastodon.social
       2021-07-08T09:10:05Z
       
       1 likes, 0 repeats
       
       @rin thank you for the lengthy explanation, I didn't get that far in learning Elixir yet, but knowing why there is a signature is the main thing I was curious about, so thanks :p