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

SRI integrity attribute fails to get rewritten when a redirection page ends up with a different domain #8769

Closed
yunj opened this issue Oct 7, 2020 · 10 comments
Labels
stage: needs information Not enough info to reproduce the issue stale no activity on this issue for a long period

Comments

@yunj
Copy link

yunj commented Oct 7, 2020

Current behavior

Our test app starts with zero.com and redirects to a page with the different domain zero-test.com in the middle of the workflow.
According to #2393 (comment), I have set experimentalSourceRewriting to true. I did see the integrity attribute gets rewritten when the runner container's iframe src has the same domain as the running page, but it does not when the redirection page has a different domain.

The iframe src is set to domain zero.com at the beginning of the test.
runner_container_iframe_src

If the redirection page's domain is different, e.g., zero-test.com, integrity attribute does not get rewritten.
integrity

Desired behavior

The integrity attribute gets rewritten to cypress:stripped-integrity even if domains are different otherwise resources are blocked.

Versions

Cypress: 5.3.0
Chrome: 85
Windows: 10

@yunj
Copy link
Author

yunj commented Oct 9, 2020

Hi @jennifer-shehane could you please confirm if this is the expected behavior? Thanks.

@jennifer-shehane
Copy link
Member

Can you explain how this redirection is happening? How are you navigating to a different domain other than the domain in the Cypress window?

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Oct 9, 2020
@yunj yunj closed this as completed Oct 10, 2020
@yunj yunj reopened this Oct 10, 2020
@yunj
Copy link
Author

yunj commented Oct 11, 2020

Hi @jennifer-shehane thanks very much for your reply. Redirecting to a different domain after SSO login happens. Is it correct that integrity attribute cannot be rewritten if the redirection ends up with a different domain?

@yunj
Copy link
Author

yunj commented Oct 16, 2020

Hi @jennifer-shehane could you please verify if integrity attribute cannot be rewritten if the redirection ends up with a different domain? Thanks.

@yunj
Copy link
Author

yunj commented Nov 1, 2020

Hi @jennifer-shehane do you need more information? Thanks.

@jennifer-shehane
Copy link
Member

From my memory, I think we do not strip integrity properties from cross domain redirects.

@yunj
Copy link
Author

yunj commented Nov 3, 2020

Hi @jennifer-shehane could you please add this feature? Thanks.

@yunj
Copy link
Author

yunj commented Dec 2, 2020

Hi @jennifer-shehane and @flotwig could we strip integrity attributes from cross domain redirects? Thanks.

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label May 17, 2023
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs information Not enough info to reproduce the issue stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests

3 participants