microsoft / microsoft/dev-tunnels
Wrong encoding in the URI path of PF request
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 508
- Forks
- 52
- Avg merge
- 20h 6m
- Merged PRs (30d)
- 7
Description
Dev Tunnels service seems to be doing a wrong formatting of the URI when forwarding a request to the host.
This is an example of accessing a forwarded port with a path through a web client:
Note that %40 is for some reason being unencoded and sent to the Codespace application as @, the %2F becomes %252F.
Repro steps:
- Create a codespace from https://github.com/github/codespaces-express
- Wait for app to start and forward port 3000
- Access the forwarded URL on a non-existing encoded path, for example:
/one%2Ftwo - Note error message
Cannot GET /one%252Ftwo
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the forwarded request with the codespaces-express app and path /one%2Ftwo, then trace how Dev Tunnels formats the URI before forwarding it to the host. Done means the encoded path reaches the application without %40 being decoded or %2F being double-encoded, and the reported error no longer shows /one%252Ftwo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100