oauth2_proxy icon indicating copy to clipboard operation
oauth2_proxy copied to clipboard

requests with double slashes get redirected

Open oppianmatt opened this issue 6 years ago • 1 comments

When making a request to the url like:

https://foo.example.com/match/%5EHOST%5C%2F/top/5?b=1

oauth2_proxy issues a 301 redirect like so:

content-length: 62
content-type: text/html; charset=utf-8
date: Thu, 28 Jun 2018 14:09:11 GMT
location: /match/%5EHOST%5C/top/5?b=1
status: 301

Note it changes %2F/ to just /

%2F is / urldecoded

The request doesn't even make it to the backend.

oppianmatt avatar Jun 28 '18 14:06 oppianmatt

This is a long-standing issue unfortunately: #506 (I think the cause is httputil.NewSingleHostReverseProxy())

ploxiln avatar Jun 28 '18 17:06 ploxiln