You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Context.Scheme accepts malformed forwarded scheme values used by host redirects #2952
With middleware.WWWRedirect(), the response contains:
Location: //external.example://www.app.example/
Because the value starts with //, browsers resolve the Location as a network-path reference with host external.example.
This requires the redirect middleware to be enabled and the forwarded header to reach Echo. Context.Scheme() should ignore forwarded scheme values other than http and https, matching its documented return values.
Activity
aldas commentedon Apr 25, 2026
some historical notes why and when these were added:
I think first remedy would be to check if these values from header are known acceptable values.
aldas commentedon Apr 25, 2026
@shblue21, does #2953 look acceptable from your perspective?
shblue21 commentedon Apr 27, 2026
@aldas I left a short comment on #2953. The
//external.examplecase looks blocked after that change, so this addresses the issue I reported.Thank you for the quick fix.
aldas commentedon Apr 27, 2026
allright , I will do a new release for
v5today and add that same fix tov4shblue21 commentedon Apr 28, 2026
Thank you for handling this and the v4 backport.