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
We have an app that needs to accept arbitrary URL-encoded variables in its path; we ran in the the usual go-bug (golang/go#10887) of encoded slashes not being handled correctly, and wrote a custom URLMatcher to deal with this. All was good.
It turns out that if our variable containing a url encoded slash starts with a slash, we hit the cleanPath code path as go decodes the %2F to a slash, the cleanPath dedupes // to a single slash and gorilla does a redirect.
This may be a dupe of #94, but I'm inclined to say its more serious as I don't seem to be able to override this with my own URLMatcher, which is kinda the whole reason we use gorilla in the first place.
Any thoughts on how to deal with this?
The text was updated successfully, but these errors were encountered:
tomwilkie
changed the title
/foo/%2Fbar gets redirects to /foo/bar
/foo/%2Fbar gets redirected to /foo/bar
Jan 11, 2016
We have an app that needs to accept arbitrary URL-encoded variables in its path; we ran in the the usual go-bug (golang/go#10887) of encoded slashes not being handled correctly, and wrote a custom URLMatcher to deal with this. All was good.
It turns out that if our variable containing a url encoded slash starts with a slash, we hit the cleanPath code path as go decodes the
%2F
to a slash, the cleanPath dedupes//
to a single slash and gorilla does a redirect.This may be a dupe of #94, but I'm inclined to say its more serious as I don't seem to be able to override this with my own URLMatcher, which is kinda the whole reason we use gorilla in the first place.
Any thoughts on how to deal with this?
The text was updated successfully, but these errors were encountered: