Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

URL-encoded slashes don't work for vault IDs or document IDs #20

Closed
DRK3 opened this issue Jan 23, 2020 · 0 comments · Fixed by #21
Closed

URL-encoded slashes don't work for vault IDs or document IDs #20

DRK3 opened this issue Jan 23, 2020 · 0 comments · Fixed by #21
Assignees

Comments

@DRK3
Copy link
Collaborator

DRK3 commented Jan 23, 2020

If your vault ID or document ID contains a slash, the resulting location that will be returned from the server will be unreachable since the slash breaks the path. Even if the slash is urlencoded as %2F, it still can't be reached.

This seems to be an inherent issue in the Go net/url and so this issue carries over to the Gorilla mux package. See gorilla/mux#77 for details.

There is a workaround: call mux.useEncodedPath() before starting the router.

We will also probably want to urlencode the returned location in the response so that it's actually usable as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants