XML-RPC discovery doesn't resolve a relative RSD link
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend-api-design
Research direction
Read wp_api/src/login/login_client.rs around WpLoginClient::xmlrpc_from_rsd and compare its URL handling with site_icons.rs. Resolve the RSD href against the homepage URL as described, then verify discovery works for a relative link such as /wp/xmlrpc.php?rsd and still handles an absolute link.
Written by the indexing model from the issue text.
Description
XML-RPC discovery sends the site's raw RSD link without resolving it against the page, so a relative link never works.
What happens
WpLoginClient::xmlrpc_from_rsd (wp_api/src/login/login_client.rs, around lines 503–512) takes the href of <link rel="EditURI" type="application/rsd+xml"> and wraps it in WpEndpointUrl(rsd_url) as-is. It's the only non-test request address that doesn't go through url::Url.
Who is affected
Sites whose RSD link is relative, such as /wp/xmlrpc.php?rsd or //example.com/wp/xmlrpc.php?rsd. WordPress core writes an absolute link, so this needs a theme, plugin or proxy that rewrites links.
In a mock run with WordPress installed under /wp/ and a relative link, discovery ended in Disabled { ByHost } and then fell back to <site>/xmlrpc.php. The absolute link found https://example.invalid/wp/xmlrpc.php.
xmlrpc_discovery isn't exported over UniFFI, so only Rust callers are affected today. If it is exported, an empty or relative link would make the Swift executor throw .badURL, after #1746's fix.
Suggested fix
Resolve the href against the homepage URL, as site_icons.rs already does: parsed_site_url.inner.join(href).
- Dominant language
- Rust
- Stars
- 38
- Forks
- 6
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 50
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing 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.
More from Automattic/wordpress-rs
-
Error Handling Swift
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/wordpress-rs#1759 ·
Maintainers usually reply within 1 day
-
Bug Error Handling Kotlin
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/wordpress-rs#1758 ·
Maintainers usually reply within 1 day
-
Expose modified_gmt on PostMetadataCollectionItemPossibly taken @winshaurya claimed this 14 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Automattic/wordpress-rs#1690 · 1 comment ·
Maintainers usually reply within 1 day
-
Bug Kotlin
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/wordpress-rs#1625 · 1 comment ·
Maintainers usually reply within 1 day
-
The offline, cancelled, and generic-fallback branches hardcode `redirects: nil`Possibly taken @jkmassel claimed this 50 days ago. OpenBug Error Handling Swift
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/wordpress-rs#1520 ·
Maintainers usually reply within 1 day
All issues in Automattic/wordpress-rs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
open-telemetry/weaver#1917 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug host P3 web
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jphacks/kz_2613#589 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation pkg:sdk project
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
priority middle
Difficulty 1/5 Under an hour Newbie friendliness 72/100
KATO-Hiro/AtCoderClans#13029 ·
Maintainers usually reply within 1 day