golgote/neturl

URLs are not encoded on output.

gcr opened this issue · 1 comments

gcr commented

When parsing a URL, this library strips the encoding from the path. But the encoding is not present when converting the URL back into a string:

th> u=url.parse("https://google.com/Link%20with%20a%20space%20in%20it/")
th> u
https://google.com/Link with a space in it/
th> {u:build()}
{
  1 : "https://google.com/Link with a space in it/"
}

The resulting URL should never have a space character in it.

Other characters are not escaped properly either, e.g. https://google.com/a%2fb%2fc resolves to https://google.com/a/b/c, which could lead to some fun security issues...

Is this the right way to convert URLs back to strings? This seems like a pretty fundamental bug.

What's the status on this issue? Is this project still being actively developed?