Skip to content

[Share] Resolves bug on attempting to copy dashboard link from non-default space#227625

Merged
eokoneyo merged 3 commits intoelastic:mainfrom
eokoneyo:chore/resolve-sdh-5574
Jul 15, 2025
Merged

[Share] Resolves bug on attempting to copy dashboard link from non-default space#227625
eokoneyo merged 3 commits intoelastic:mainfrom
eokoneyo:chore/resolve-sdh-5574

Conversation

@eokoneyo
Copy link
Contributor

@eokoneyo eokoneyo commented Jul 11, 2025

Summary

Closes #191090
Closes #227976

Only pass along url intended to be shortened, when validating that we aren't shortening some URL external to Kibana

@eokoneyo eokoneyo self-assigned this Jul 11, 2025
@eokoneyo eokoneyo added backport This PR is a backport of another PR release_note:fix Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// labels Jul 11, 2025
@eokoneyo
Copy link
Contributor Author

/ci

@eokoneyo eokoneyo force-pushed the chore/resolve-sdh-5574 branch from 7c559b9 to 3de03ac Compare July 11, 2025 13:27
@eokoneyo
Copy link
Contributor Author

/ci

@eokoneyo eokoneyo marked this pull request as ready for review July 11, 2025 16:04
@eokoneyo eokoneyo requested a review from a team as a code owner July 11, 2025 16:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@eokoneyo
Copy link
Contributor Author

@elasticmachine merge upstream

@eokoneyo eokoneyo requested a review from a team as a code owner July 14, 2025 20:57
@eokoneyo eokoneyo force-pushed the chore/resolve-sdh-5574 branch 2 times, most recently from 779d023 to 53606cf Compare July 15, 2025 00:33
Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one recommendation to relocate the new test.

cc @tsullivan for awareness


const urlFromParams = (params as { url: string | undefined }).url;
if (urlFromParams && !isInternalURL(urlFromParams, http.basePath.get(req))) {
if (urlFromParams && !isInternalURL(urlFromParams)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT this still works correctly to reject external URLs - it just removes the need to match the space in the base path. Our automated tests also confirm this.

@eokoneyo eokoneyo force-pushed the chore/resolve-sdh-5574 branch from 53606cf to a4527bc Compare July 15, 2025 10:07
@eokoneyo eokoneyo requested a review from a team as a code owner July 15, 2025 10:07
@eokoneyo eokoneyo force-pushed the chore/resolve-sdh-5574 branch from a4527bc to 8c93f51 Compare July 15, 2025 10:11
@eokoneyo eokoneyo changed the title [Share] Resolves error thrown on attempting to copy dashboard link Jul 15, 2025
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @eokoneyo

Copy link
Contributor

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks for adding a test!

@eokoneyo eokoneyo merged commit 245c8fb into elastic:main Jul 15, 2025
11 of 12 checks passed
@eokoneyo eokoneyo deleted the chore/resolve-sdh-5574 branch July 15, 2025 12:56
eokoneyo added a commit that referenced this pull request Jul 16, 2025
…non-default space (#227625) (#228007)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Share] Resolves bug on attempting to copy dashboard link from
non-default space
(#227625)](#227625)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Eyo O.
Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-15T12:56:52Z","message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:fix","backport:skip","Team:SharedUX","v9.2.0"],"title":"[Share]
Resolves bug on attempting to copy dashboard link from non-default
space","number":227625,"url":"https://github.com/elastic/kibana/pull/227625","mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227625","number":227625,"mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}}]}]
BACKPORT-->

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
eokoneyo added a commit to eokoneyo/kibana that referenced this pull request Jul 16, 2025
…fault space (elastic#227625)

## Summary

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit 245c8fb)

# Conflicts:
#	src/platform/plugins/shared/share/server/url_service/http/short_urls/register_create_route.ts
#	x-pack/test/functional_enterprise_search/apps/enterprise_search/with_host_configured/index.ts
eokoneyo added a commit to eokoneyo/kibana that referenced this pull request Jul 16, 2025
…fault space (elastic#227625)

## Summary

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit 245c8fb)

# Conflicts:
#	src/platform/plugins/shared/share/server/url_service/http/short_urls/register_create_route.ts
#	x-pack/test/functional_enterprise_search/apps/enterprise_search/with_host_configured/index.ts
eokoneyo added a commit that referenced this pull request Jul 16, 2025
… non-default space (#227625) (#228033)

# Backport

This will backport the following commits from `main` to `7.17`:
- [[Share] Resolves bug on attempting to copy dashboard link from
non-default space
(#227625)](#227625)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Eyo O.
Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-15T12:56:52Z","message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:fix","backport:skip","Team:SharedUX","v9.2.0"],"title":"[Share]
Resolves bug on attempting to copy dashboard link from non-default
space","number":227625,"url":"https://github.com/elastic/kibana/pull/227625","mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227625","number":227625,"mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}},{"url":"https://github.com/elastic/kibana/pull/228007","number":228007,"branch":"9.0","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/228008","number":228008,"branch":"8.18","state":"OPEN"}]}]
BACKPORT-->
eokoneyo added a commit to eokoneyo/kibana that referenced this pull request Jul 17, 2025
…fault space (elastic#227625)

## Summary

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit 245c8fb)

# Conflicts:
#	src/plugins/share/server/url_service/http/short_urls/register_create_route.ts
eokoneyo added a commit to eokoneyo/kibana that referenced this pull request Jul 18, 2025
…fault space (elastic#227625)

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit 245c8fb)
eokoneyo added a commit to eokoneyo/kibana that referenced this pull request Jul 18, 2025
…fault space (elastic#227625)

## Summary

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit 245c8fb)
@eokoneyo
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.15.5-1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

eokoneyo added a commit to eokoneyo/kibana that referenced this pull request Jul 18, 2025
…fault space (elastic#227625)

## Summary

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit 245c8fb)
@eokoneyo
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.15.5-2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

eokoneyo added a commit that referenced this pull request Jul 18, 2025
…from non-default space (#227625) (#228605)

# Backport

This will backport the following commits from `main` to `8.15.5-1`:
- [[Share] Resolves bug on attempting to copy dashboard link from
non-default space
(#227625)](#227625)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Eyo O.
Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-15T12:56:52Z","message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:fix","backport:skip","Team:SharedUX","v9.2.0","v8.18.4","v9.0.4","v7.17.30","v8.17.9"],"title":"[Share]
Resolves bug on attempting to copy dashboard link from non-default
space","number":227625,"url":"https://github.com/elastic/kibana/pull/227625","mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227625","number":227625,"mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228008","number":228008,"state":"MERGED","mergeCommit":{"sha":"ef9a4568341c938074edf76d25cffb85c4588b5d","message":"[8.18]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228008)\n\n# Backport\n\nThis will
backport the following commits from `main` to `8.18`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>"}},{"branch":"9.0","label":"v9.0.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228007","number":228007,"state":"MERGED","mergeCommit":{"sha":"479a5830b8a7d46c306b05ff867532948ab1e920","message":"[9.0]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228007)\n\n# Backport\n\nThis will
backport the following commits from `main` to `9.0`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\n---------\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Timothy Sullivan
<tsullivan@elastic.co>"}},{"branch":"7.17","label":"v7.17.30","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228033","number":228033,"state":"MERGED","mergeCommit":{"sha":"9c6a697df554a1eab311f1950d90077fff1a2470","message":"[7.17]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228033)\n\n# Backport\n\nThis will
backport the following commits from `main` to `7.17`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"8.17","label":"v8.17.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228012","number":228012,"state":"MERGED","mergeCommit":{"sha":"347be553410148ec3b65a9be89f49905987276ce","message":"[8.17]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228012)\n\n# Backport\n\nThis will
backport the following commits from `main` to `8.17`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>"}},{"url":"https://github.com/elastic/kibana/pull/228014","number":228014,"branch":"8.15","state":"OPEN"}]}]
BACKPORT-->
@Dosant
Copy link
Contributor

Dosant commented Jul 22, 2025

💚 All backports created successfully

Status Branch Result
9.1
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

Dosant pushed a commit to Dosant/kibana that referenced this pull request Jul 22, 2025
…fault space (elastic#227625)

## Summary

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit 245c8fb)
Dosant pushed a commit to Dosant/kibana that referenced this pull request Jul 22, 2025
…fault space (elastic#227625)

## Summary

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit 245c8fb)
Bluefinger pushed a commit to Bluefinger/kibana that referenced this pull request Jul 22, 2025
…fault space (elastic#227625)

## Summary

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--
### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->
Dosant added a commit that referenced this pull request Jul 22, 2025
…non-default space (#227625) (#228920)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Share] Resolves bug on attempting to copy dashboard link from
non-default space
(#227625)](#227625)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Eyo O.
Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-15T12:56:52Z","message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:fix","backport:skip","Team:SharedUX","v8.15.5","v9.2.0","v8.18.4","v9.0.4","v7.17.30","v8.17.9"],"title":"[Share]
Resolves bug on attempting to copy dashboard link from non-default
space","number":227625,"url":"https://github.com/elastic/kibana/pull/227625","mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227625","number":227625,"mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228008","number":228008,"state":"MERGED","mergeCommit":{"sha":"ef9a4568341c938074edf76d25cffb85c4588b5d","message":"[8.18]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228008)\n\n# Backport\n\nThis will
backport the following commits from `main` to `8.18`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>"}},{"branch":"9.0","label":"v9.0.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228007","number":228007,"state":"MERGED","mergeCommit":{"sha":"479a5830b8a7d46c306b05ff867532948ab1e920","message":"[9.0]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228007)\n\n# Backport\n\nThis will
backport the following commits from `main` to `9.0`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\n---------\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Timothy Sullivan
<tsullivan@elastic.co>"}},{"branch":"7.17","label":"v7.17.30","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228033","number":228033,"state":"MERGED","mergeCommit":{"sha":"9c6a697df554a1eab311f1950d90077fff1a2470","message":"[7.17]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228033)\n\n# Backport\n\nThis will
backport the following commits from `main` to `7.17`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"8.17","label":"v8.17.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228012","number":228012,"state":"MERGED","mergeCommit":{"sha":"347be553410148ec3b65a9be89f49905987276ce","message":"[8.17]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228012)\n\n# Backport\n\nThis will
backport the following commits from `main` to `8.17`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>"}},{"url":"https://github.com/elastic/kibana/pull/228605","number":228605,"branch":"8.15.5-1","state":"MERGED","mergeCommit":{"sha":"d489a108eb89b1e03e03d255d9bf889fe52919d8","message":"[8.15.5-1]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228605)\n\n# Backport\n\nThis will
backport the following commits from `main` to `8.15.5-1`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}}]}]
BACKPORT-->

---------

Co-authored-by: Eyo O. Eyo <7893459+eokoneyo@users.noreply.github.com>
Dosant added a commit that referenced this pull request Jul 22, 2025
… non-default space (#227625) (#228921)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Share] Resolves bug on attempting to copy dashboard link from
non-default space
(#227625)](#227625)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Eyo O.
Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-15T12:56:52Z","message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:fix","backport:skip","Team:SharedUX","v8.15.5","v9.2.0","v8.18.4","v9.0.4","v7.17.30","v8.17.9"],"title":"[Share]
Resolves bug on attempting to copy dashboard link from non-default
space","number":227625,"url":"https://github.com/elastic/kibana/pull/227625","mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227625","number":227625,"mergeCommit":{"message":"[Share]
Resolves bug on attempting to copy dashboard link from non-default space
(#227625)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/191090\nCloses
https://github.com/elastic/kibana/issues/227976\n\nOnly pass along url
intended to be shortened, when validating that we\naren't shortening
some URL external to
Kibana\n\n","sha":"245c8fb86326d0ac25a9a6106e5fcfec09f4fab2"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228008","number":228008,"state":"MERGED","mergeCommit":{"sha":"ef9a4568341c938074edf76d25cffb85c4588b5d","message":"[8.18]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228008)\n\n# Backport\n\nThis will
backport the following commits from `main` to `8.18`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>"}},{"branch":"9.0","label":"v9.0.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228007","number":228007,"state":"MERGED","mergeCommit":{"sha":"479a5830b8a7d46c306b05ff867532948ab1e920","message":"[9.0]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228007)\n\n# Backport\n\nThis will
backport the following commits from `main` to `9.0`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\n---------\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Timothy Sullivan
<tsullivan@elastic.co>"}},{"branch":"7.17","label":"v7.17.30","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228033","number":228033,"state":"MERGED","mergeCommit":{"sha":"9c6a697df554a1eab311f1950d90077fff1a2470","message":"[7.17]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228033)\n\n# Backport\n\nThis will
backport the following commits from `main` to `7.17`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"8.17","label":"v8.17.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228012","number":228012,"state":"MERGED","mergeCommit":{"sha":"347be553410148ec3b65a9be89f49905987276ce","message":"[8.17]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228012)\n\n# Backport\n\nThis will
backport the following commits from `main` to `8.17`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>"}},{"url":"https://github.com/elastic/kibana/pull/228605","number":228605,"branch":"8.15.5-1","state":"MERGED","mergeCommit":{"sha":"d489a108eb89b1e03e03d255d9bf889fe52919d8","message":"[8.15.5-1]
[Share] Resolves bug on attempting to copy dashboard link from
non-default space (#227625) (#228605)\n\n# Backport\n\nThis will
backport the following commits from `main` to `8.15.5-1`:\n- [[Share]
Resolves bug on attempting to copy dashboard link from\nnon-default
space\n(#227625)](https://github.com/elastic/kibana/pull/227625)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}}]}]
BACKPORT-->

Co-authored-by: Eyo O. Eyo <7893459+eokoneyo@users.noreply.github.com>
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…fault space (elastic#227625)

## Summary

Closes elastic#191090
Closes elastic#227976

Only pass along url intended to be shortened, when validating that we
aren't shortening some URL external to Kibana

<!--
### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting backport This PR is a backport of another PR release_note:fix Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// v7.17.30 v8.15.5 v8.17.9 v8.18.4 v8.19.0 v9.0.4 v9.1.0 v9.2.0

6 participants