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

fix(core): hardening attribute and property binding rules for <iframe> elements #47964

Closed
wants to merge 1 commit into from

Conversation

AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Nov 4, 2022

This commit updates the logic related to the attribute and property binding rules for <iframe> elements. There is a set of <iframe> attributes that may affect the behavior of an iframe and this change enforces that these attributes are only applied as static attributes, making sure that they are taken into account while creating an <iframe>.

If Angular detects that some of the security-sensitive attributes are applied as an attribute or property binding, it throws an error message, which contains the name of an attribute that is causing the problem and the name of a Component where an iframe is located.

BREAKING CHANGE:

Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir AndrewKushnir added state: WIP area: core Issues related to the framework runtime target: rc This PR is targeted for the next release-candidate labels Nov 4, 2022
@ngbot ngbot bot modified the milestone: Backlog Nov 4, 2022
@angular-robot angular-robot bot added the detected: breaking change PR contains a commit with a breaking change label Nov 4, 2022
@AndrewKushnir AndrewKushnir force-pushed the iframe_bindings branch 2 times, most recently from 6ee1b09 to c33d991 Compare November 4, 2022 01:50
@pkozlowski-opensource
Copy link
Member

We do have a legit CI failure: https://app.circleci.com/pipelines/github/angular/angular/52802/workflows/69ac3544-43a7-4f3f-b24e-0dca7d5b8897/jobs/1250755

@AndrewKushnir AndrewKushnir force-pushed the iframe_bindings branch 2 times, most recently from 39d0d48 to 0531f7a Compare November 4, 2022 22:00
@AndrewKushnir AndrewKushnir changed the title fix(core): hardening rules related to the attribute order on iframe elements fix(core): hardening attribute and property binding rules for <iframe> elements Nov 4, 2022
@AndrewKushnir AndrewKushnir force-pushed the iframe_bindings branch 4 times, most recently from 29daef7 to e16ce25 Compare November 4, 2022 23:14
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Nov 4, 2022
@AndrewKushnir AndrewKushnir marked this pull request as ready for review November 4, 2022 23:29
@AndrewKushnir
Copy link
Contributor Author

AndrewKushnir commented Nov 4, 2022

Presubmit + TGP.

@AndrewKushnir AndrewKushnir force-pushed the iframe_bindings branch 3 times, most recently from 9d46d44 to c44d7ad Compare November 8, 2022 01:16
@AndrewKushnir
Copy link
Contributor Author

TGP #2.

…> elements

This commit updates the logic related to the attribute and property binding rules for <iframe> elements. There is a set of <iframe> attributes that may affect the behavior of an iframe and this change enforces that these attributes are only applied as static attributes, making sure that they are taken into account while creating an <iframe>.

If Angular detects that some of the security-sensitive attributes are applied as an attribute or property binding, it throws an error message, which contains the name of an attribute that is causing the problem and the name of a Component where an iframe is located.

BREAKING CHANGE:

Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.
Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

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

Reviewed-for: fw-security,global-approvers

@alxhub alxhub added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 9, 2022
@alxhub
Copy link
Member

alxhub commented Nov 9, 2022

This PR was merged into the repository by commit 2d8d562.

@alxhub alxhub closed this in 2d8d562 Nov 9, 2022
alxhub pushed a commit that referenced this pull request Nov 9, 2022
…> elements (#47964)

This commit updates the logic related to the attribute and property binding rules for <iframe> elements. There is a set of <iframe> attributes that may affect the behavior of an iframe and this change enforces that these attributes are only applied as static attributes, making sure that they are taken into account while creating an <iframe>.

If Angular detects that some of the security-sensitive attributes are applied as an attribute or property binding, it throws an error message, which contains the name of an attribute that is causing the problem and the name of a Component where an iframe is located.

BREAKING CHANGE:

Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.

PR Close #47964
AndrewKushnir added a commit to AndrewKushnir/angular that referenced this pull request Nov 11, 2022
…> elements (angular#47964)

This commit updates the logic related to the attribute and property binding rules for <iframe> elements. There is a set of <iframe> attributes that may affect the behavior of an iframe and this change enforces that these attributes are only applied as static attributes, making sure that they are taken into account while creating an <iframe>.

If Angular detects that some of the security-sensitive attributes are applied as an attribute or property binding, it throws an error message, which contains the name of an attribute that is causing the problem and the name of a Component where an iframe is located.

BREAKING CHANGE:

Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.

PR Close angular#47964
AndrewKushnir added a commit to AndrewKushnir/angular that referenced this pull request Nov 11, 2022
…> elements (angular#47964)

This commit updates the logic related to the attribute and property binding rules for <iframe> elements. There is a set of <iframe> attributes that may affect the behavior of an iframe and this change enforces that these attributes are only applied as static attributes, making sure that they are taken into account while creating an <iframe>.

If Angular detects that some of the security-sensitive attributes are applied as an attribute or property binding, it throws an error message, which contains the name of an attribute that is causing the problem and the name of a Component where an iframe is located.

BREAKING CHANGE:

Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.

PR Close angular#47964
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 10, 2022
trekladyone pushed a commit to trekladyone/angular that referenced this pull request Feb 1, 2023
…> elements (angular#47964)

This commit updates the logic related to the attribute and property binding rules for <iframe> elements. There is a set of <iframe> attributes that may affect the behavior of an iframe and this change enforces that these attributes are only applied as static attributes, making sure that they are taken into account while creating an <iframe>.

If Angular detects that some of the security-sensitive attributes are applied as an attribute or property binding, it throws an error message, which contains the name of an attribute that is causing the problem and the name of a Component where an iframe is located.

BREAKING CHANGE:

Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.

PR Close angular#47964
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime detected: breaking change PR contains a commit with a breaking change target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants