logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: d2f56d1cbc7ef985c2565ccc899a1a4f3c07e524
parent: d0b4709b2a0bbd9579a3f115c3d200661ccb784a
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Thu, 28 Sep 2017 23:20:08 +0200

Change max redirects followed to 2 (#5136)

I see no reason to allow more than that. Usually a redirect is
HTTP->HTTPS, then maybe URL structure changed, but more than that
is highly unlikely to be a legitimate use case.

Diffstat:

Mapp/lib/request.rb2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/lib/request.rb b/app/lib/request.rb @@ -85,6 +85,6 @@ class Request end def http_client - HTTP.timeout(:per_operation, timeout).follow + HTTP.timeout(:per_operation, timeout).follow(max_hops: 2) end end