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

Make a deep copy when cloning a policy container #6671

Merged
merged 1 commit into from May 11, 2021

Conversation

antosart
Copy link
Member

@antosart antosart commented May 11, 2021

I realized that https://infra.spec.whatwg.org/#list-clone creates a shallow copy of the list, hence the current algorithm for cloning a policy container just clones references to the policies in the other CSP list. Since a CSP policy is immutable, this is not a problem in principle (at least at the moment). Nevertheless, I believe it is better to create a deep copy here.


/origin.html ( diff )

@antosart antosart requested a review from annevk May 11, 2021 08:13
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

I'll prefix the commit with "Editorial:" after the feedback is addressed. Let me know if that's not okay.

source Show resolved Hide resolved
@annevk annevk merged commit 4422a9c into whatwg:main May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants