Only proxy HTTP and HTTP urls via Media Proxy #860

Merged
floatingghost merged 2 commits from nopjmp/akkoma:media-proxy-only-http into develop 2025-01-03 15:25:14 +00:00
Contributor

We make an assumption that we are only proxying HTTP/HTTPS hosted
media through the media proxy endpoint.

Fixes: #859

We make an assumption that we are only proxying HTTP/HTTPS hosted media through the media proxy endpoint. Fixes: #859
Author
Contributor

The only test I had issues with was "redirects to media proxy URI in case of thumbnailing error" due to having installed html2ps and it was added as a delegate to ImageMagick allowed for the error to be converted into an image. I uninstalled html2ps and everything passed.

We probably don't want to convert html into any images, so if we don't want that I can look at making another PR to see about removing extra ImageMagick functionality.

The only test I had issues with was "redirects to media proxy URI in case of thumbnailing error" due to having installed html2ps and it was added as a delegate to ImageMagick allowed for the error to be converted into an image. I uninstalled html2ps and everything passed. We probably don't want to convert html into any images, so if we don't want that I can look at making another PR to see about removing extra ImageMagick functionality.
Owner

cosmetic: mix format

Oh right, you’ve mentioned using elixir 1.14, but the style guide slightly changed with 1.15 or 1.16; sorry i forgot about that. Current develop is already mix format clean with current elixir. Apart from the first commit, i can confirm this patch is mix formatclean too, so just drop the first one and everything should be fine; thanks!

> cosmetic: mix format Oh right, you’ve mentioned using elixir 1.14, but the style guide slightly changed with 1.15 or 1.16; sorry i forgot about that. Current `develop` is already `mix format` clean with current elixir. Apart from the first commit, i can confirm this patch is `mix format`clean too, so just drop the first one and everything should be fine; thanks!
nopjmp force-pushed media-proxy-only-http from 8ea721a5f2
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test Pipeline is pending approval
to ff5d197341
Some checks are pending
ci/woodpecker/pull_request_closed/build-amd64 Pipeline is pending approval
ci/woodpecker/pull_request_closed/build-arm64 Pipeline is pending approval
ci/woodpecker/pull_request_closed/docs Pipeline is pending approval
ci/woodpecker/pull_request_closed/lint Pipeline is pending approval
ci/woodpecker/pull_request_closed/test Pipeline is pending approval
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test Pipeline is pending approval
2024-12-17 02:35:23 +00:00
Compare
Author
Contributor

fixed, it was unclear what Elixir version I should be using. I'm not super familiar with Elixir so I wasn't aware formatting defaults changed between versions.

fixed, it was unclear what Elixir version I should be using. I'm not super familiar with Elixir so I wasn't aware formatting defaults changed between versions.
Owner

it surprised me too when it happened `^^

it surprised me too when it happened `^^
Oneric approved these changes 2024-12-17 03:01:50 +00:00
floatingghost deleted branch media-proxy-only-http 2025-01-03 15:25:15 +00:00
Owner

@nopjmp this may have led to some cases of IP leakage; see: #900
Since I’m not using media proxy, any chance you could take a look at it?

A fix is available here #903, but it’d be appreciated if f you could test it in prod and give feedback on (the absence of) any problems

@nopjmp this may have led to some cases of IP leakage; see: https://akkoma.dev/AkkomaGang/akkoma/issues/900 ~~Since I’m not using media proxy, any chance you could take a look at it?~~ A fix is available here #903, but it’d be appreciated if f you could test it in prod and give feedback on (the absence of) any problems
Author
Contributor

@Oneric #903 will work fine. I've not see any issues on my instance with the patch but it's very small compared to other Akkoma instances.

@Oneric #903 will work fine. I've not see any issues on my instance with the patch but it's very small compared to other Akkoma instances.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AkkomaGang/akkoma!860
No description provided.