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

[stable27] fix: emit allow attribute on iframe for the clipboard (fixes #3474) #3482

Merged
merged 1 commit into from Feb 27, 2024

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Feb 20, 2024

Backport of PR #3475

As described at
<https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes>
newer Chrome requires explicit markup for code in an iframe to execute
JS that requires permissions, like clipboard.

If this markup is missing, then the user won't be even asked.  Use the
wildcard syntax, because the COOL JS code in the iframe is not the
initial src attribute value of the iframe, it gets changed later.

With this, a permission popup on paste shows up in Chrome even if the
paste is perssed on the notebookbar, even if nextcloud is served from
one domain and COOL is served from an other domain.

This fixes the document edit case; possibly it should be also added at
all other places where the allowfullscreen attribute is used, which is
not done in this commit.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
@backportbot backportbot bot added bug Something isn't working 3. to review Ready to be reviewed labels Feb 20, 2024
@backportbot backportbot bot added this to the Nextcloud 27 milestone Feb 20, 2024
Copy link

cypress bot commented Feb 20, 2024

Passing run #783 ↗︎

0 31 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

[stable27] fix: emit allow attribute on iframe for the clipboard (fixes #3474)
Project: Richdocuments Commit: 96d0a63b7c
Status: Passed Duration: 04:43 💡
Started: Feb 27, 2024 10:30 AM Ended: Feb 27, 2024 10:35 AM

Review all test suite changes for PR #3482 ↗︎

@vmiklos
Copy link
Contributor

vmiklos commented Feb 21, 2024

Reading the cypress log, this seems to be the root of the problem:

AssertionError: Timed out retrying after 30000ms: expected '<div#viewer.modal-mask.viewer.modal-mask--dark.icon-loading.theme--light>' not to have class 'icon-loading'

But that seems to be unrelated to this PR. What is the best next step here, should we re-try CI or is that to be ignored? Thanks.

@juliushaertl
Copy link
Member

Let me restart them, seems like a temporary failure

@juliushaertl juliushaertl merged commit 2abb40f into stable27 Feb 27, 2024
34 checks passed
@juliushaertl juliushaertl deleted the backport/3475/stable27 branch February 27, 2024 11:02
@vmiklos
Copy link
Contributor

vmiklos commented Feb 28, 2024

Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Ready to be reviewed bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants