Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only open direct link files if link points to Files app #3870

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Mar 2, 2023

Until now, we always opened direct link files when a link contained a fileId query parameter. This breaks e.g. links to pages from the Collectives app, which contain fileId parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

@mejo-
Copy link
Member Author

mejo- commented Mar 2, 2023

/backport to stable25

@cypress
Copy link

cypress bot commented Mar 2, 2023

1 flaky tests on run #8911 ↗︎

0 141 0 0 Flakiness 1

Details:

Only open direct link files if link points to Files app
Project: Text Commit: c9dfae92af
Status: Passed Duration: 03:35 💡
Started: Mar 6, 2023 1:17 PM Ended: Mar 6, 2023 1:20 PM
Flakiness  cypress/e2e/share.spec.js • 1 flaky test

View Output Video

Test Artifacts
Open test.md in viewer > Share a file with download disabled shows an error Output Screenshots

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@mejo- mejo- force-pushed the fix/collectives_fileid_links branch from ec1c603 to 4baa252 Compare March 2, 2023 12:16
@mejo- mejo- force-pushed the fix/collectives_fileid_links branch 5 times, most recently from 734475e to 7d55553 Compare March 2, 2023 15:35
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

Enough to fix #3857 👍

src/helpers/links.js Show resolved Hide resolved
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <[email protected]>
@mejo- mejo- force-pushed the fix/collectives_fileid_links branch from 7d55553 to ed89dd1 Compare March 6, 2023 12:19
@mejo-
Copy link
Member Author

mejo- commented Mar 6, 2023

/compile

Signed-off-by: nextcloud-command <[email protected]>
@mejo- mejo- merged commit 621c744 into main Mar 6, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix/collectives_fileid_links branch March 6, 2023 13:27
@mejo-
Copy link
Member Author

mejo- commented Mar 6, 2023

/backport ed89dd1 to stable25

@mejo-
Copy link
Member Author

mejo- commented Mar 6, 2023

/backport ed89dd1 to stable26

@mejo-
Copy link
Member Author

mejo- commented Mar 6, 2023

/backport ed89dd1 to stable25

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

2 similar comments
@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

@mejo-
Copy link
Member Author

mejo- commented Mar 6, 2023

Manual backport to stable25: #3905

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Links to Collectives pages get opened in Files app
3 participants