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
The wrong URL will be opened when the {url: true} option is set and the URL contains encoded characters. This is particularly problematic when using reserved characters in query parameters (in practice this is common with base64-encoded values). For example:
Since query string only gets escaped correctly on WSL when {url: true} is set (cf. #171), there's currently no way to open a URL containing reserved characters in the query string on WSL.
I'm thinking that a solution would be to only encode double-quotes, i.e.:
@sindresorhus@herberttn The change in #182 uses url.URL to parse and encode the URL which is supported since Node v7.0.0, v6.13.0. This will work for both encoded and unencoded URLs, but it will throw a TypeError if the target is not a valid URL.
The wrong URL will be opened when the
{url: true}
option is set and the URL contains encoded characters. This is particularly problematic when using reserved characters in query parameters (in practice this is common with base64-encoded values). For example:The valid string representation of this URL is https://httpbin.org/get?foo=%25&bar=%26&baz=%3D and when opened with
{url: false}
the service will echo the correct parameters:However, when opened with
{url: true}
the values get double-encoded:Since query string only gets escaped correctly on WSL when
{url: true}
is set (cf. #171), there's currently no way to open a URL containing reserved characters in the query string on WSL.I'm thinking that a solution would be to only encode double-quotes, i.e.:
Alternatively:
The text was updated successfully, but these errors were encountered: