Escaping `/` and `::` in endpoint URLs
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, react
Research direction
No files or tests are named. Reproduce the listed v1 and v2 site-field and direct-URL cases in the React API console, then trace where endpoint URLs are assembled. Done means slash and double-colon inputs are converted appropriately for each API version and the listed requests reach the intended endpoint.
Written by the indexing model from the issue text.
Description
I tested out Jetpack sites installed into subdomains. In the existing (old) console it is pretty badly broken, but it is mostly working correctly here.
Test cases
v1 API; enter make.wordpress.org/core into site field

This does not work - it sends a request to v1.1/sites/make.wordpress.org/core/posts/ which is a 404 of course.
v1 API; enter make.wordpress.org%2Fcore into site field
This works correctly.
v1 API; enter make.wordpress.org/core into URL directly

This does not work, and we shouldn't expect it to work. There's no reliable way to tell that this is a URL for the /posts endpoint.
v1 API; enter make.wordpress.org%2Fcore into URL directly
This works correctly.
v1 API; enter make.wordpress.org::core into site field or into URL directly
This is sent to the server correctly, but the v1 API does not support it.
v2 API; enter make.wordpress.org/core or make.wordpress.org%2Fcore
This is sent to the server in the same way as the v1 API, but the v2 API does not support it.
v2 API; enter make.wordpress.org::core into site field or into URL directly
This works correctly.
Potential improvements
- If
/is entered into asiteURL field, transform it into%2F - If
::is entered for the v1 API, transform it into%2F - If
/or%2Fare entered for the v2 API, transform it into::
- Dominant language
- JavaScript
- Stars
- 73
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from Automattic/wp-api-console
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Automattic/wp-api-console#120 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
Automattic/wp-api-console#119 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Automattic/wp-api-console#78 ·
-
question
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Automattic/wp-api-console#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Automattic/wp-api-console#68 · 3 comments ·
All issues in Automattic/wp-api-console
Similar issues
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inferencePossibly taken @alok-108 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/playwright#43263 ·
Maintainers usually reply within 1 day
-
bug traffic
Difficulty 2/5 Under an hour Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
processing/p5.sound.js#123 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
PhilflowIO/dav-mcp#146 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
career-ops-hq/career-ops#4910 · 2 comments ·
Maintainers usually reply within 2 days