Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect URL percent decoding (%3 is stripped) when browser is opened remotely #9841

Closed
mstange opened this issue May 2, 2024 · 5 comments · Fixed by microsoft/vscode#211930
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug remote Issues in the code server support verified Verification succeeded
Milestone

Comments

@mstange
Copy link

mstange commented May 2, 2024

  • VSCode Version: 1.88.1
  • Local OS Version: macOS 14.4.1
  • Remote OS Version: Windows 10
  • Remote Extension/Connection Type: Server (?)

Steps to Reproduce:

  1. Run a command in the remote terminal that wants to load a URL in a browser on the server. I'm using samply load profile.json .

Expected results:

A browser should open on my client with that URL.

In this case the URL should have been https://profiler.firefox.com/from-url/http%3A%2F%2F127.0.0.1%3A3001%2F3swmpxx3xvzrh762ym3gf2vyb3l8cq98cd18k0kFprofile.json/?symbolServer=http%3A%2F%2F127.0.0.1%3A3001%2F3swmpxx3xvzrh762ym3gf2vyb3l8cq98cd18k0k

Actual results:

A browser opens on my client with a different URL.

In this case the URL that opened instead is https://profiler.firefox.com/from-url/httpAFF127.0.0.1A3001F3swmpxx3xvzrh762ym3gf2vyb3l8cq98cd18k0kFprofile.json/?symbolServer=httpAFF127.0.0.1A3001F3swmpxx3xvzrh762ym3gf2vyb3l8cq98cd18k0k

The incorrect URL has all instances of %2 and %3 stripped from it. This breaks any URL-encoded characters.

Specifically, http%3A%2F%2F127.0.0.1%3A3001%2F has become httpAFF127.0.0.1A3001F.


Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: Didn't try

This issue does not occur if the remote server is a macOS or Linux machine. I've only seen it with the host being Windows.

@aeschli aeschli added this to the May 2024 milestone May 3, 2024
@aeschli aeschli added remote Issues in the code server support bug Issue identified by VS Code Team member as probable bug labels May 3, 2024
@mstange
Copy link
Author

mstange commented May 4, 2024

Thanks for the quick fix!

@eleanorjboyd
Copy link
Member

@mstange- to confirm, were you able to verify if this fix worked? Thanks!

@mstange
Copy link
Author

mstange commented May 29, 2024

I'm not sure how - is there a prerelease version that I can try?

@andreamah
Copy link

It looks like the fix was in the core product. Can you try the latest version of VS Code Insiders to see whether this is fixed?

@andreamah andreamah added the author-verification-requested Issues potentially verifiable by issue author label May 29, 2024
@mstange
Copy link
Author

mstange commented May 29, 2024

It works! I just tried the macOS Insider build and ssh'd into Windows, ran samply load profile.json, and the browser opened with the correct URL on the Mac. Thanks!

@andreamah andreamah added the verified Verification succeeded label May 29, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug remote Issues in the code server support verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants