Skip to content

Strip the fragment from the RDAP base URL in getFindURL() - #8

Open
tomsommer wants to merge 1 commit into
ArrayAccess:mainfrom
tomsommer:fix-find-url-fragment
Open

tomsommer wants to merge 1 commit into
ArrayAccess:mainfrom
tomsommer:fix-find-url-fragment

Conversation

@tomsommer

Copy link
Copy Markdown

In AbstractRdapProtocol::getFindURL() the fragment branch split on ? instead of #:

if (str_contains($url, '#')) {
    [$url] = explode('?', $url);
}

So a bootstrap base URL with a fragment kept it, and the search path ended up after the fragment:

https://rdap.example/org/#frag/domain/example.org   // before
https://rdap.example/org/domain/example.org         // after

phpcs and phpstan pass.

The fragment branch split on '?' instead of '#', so a base URL with a
fragment produced a find URL with the search path after the fragment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant