When adding a query destination parameter to a cross-domain link, we expect to return to the original domain after processing. But, by default, destination parameter are relative only, so it redirects to the targeted domain instead of the original one.

Drupal strips any "destination" parameter that is not internal, so we instead add a custom "destination_domain" parameter that we prepend to the original "destination" parameter after validation (trusted host, no parameter, no fragment).

Current implementation

For now, we only support cross-domain redirects to the current page to avoid any unwanted side-effects.

Issue fork domain-3570210

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Issue summary: View changes
mably’s picture

Status: Active » Needs review
mably’s picture

Issue summary: View changes
mably’s picture

Issue summary: View changes
mably’s picture

Issue summary: View changes

  • mably committed 5ff2bd3b on 3.x
    feat: #3570210 Handle cross-domain destination query parameter with...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mably’s picture

Component: Code » - Domain Source
mably’s picture

Component: - Domain Source » Code

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.