Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Manipulation: Make jQuery.htmlPrefilter an identity function#4642

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mgol merged 1 commit intojquery:masterfrommgol:no-xhtml-shortcuts
Mar 16, 2020

Conversation

mgol
Copy link
Member

@mgolmgol commentedMar 14, 2020
edited
Loading

Summary

Make jQuery.htmlPrefilter an identity function; fix tests.

This is a security fix forCVE-2020-11022.

Checklist

@mgolmgol added Needs review Tests Discuss in MeetingReserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labelsMar 14, 2020
@mgolmgol added this to the3.5.0 milestoneMar 14, 2020
@mgolmgol self-assigned thisMar 14, 2020
Copy link
Member

@timmywiltimmywil left a comment

Choose a reason for hiding this comment

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

LGTM

@mgolmgol changed the titleTests: Make tests pass with jQuery.htmlPrefilter being an identity functionManipulation: Make jQuery.htmlPrefilter an identity functionMar 16, 2020
@mgolmgol added Manipulation and removed Discuss in MeetingReserved for Issues and PRs that anyone would like to discuss in the weekly meeting. Needs review Tests labelsMar 16, 2020
@mgolmgol merged commit90fed4b intojquery:masterMar 16, 2020
@mgolmgol deleted the no-xhtml-shortcuts branchMarch 16, 2020 20:49
mgol added a commit that referenced this pull requestMar 16, 2020
@mgol
Copy link
MemberAuthor

Landed onmaster in90fed4b & on3.x-stable in1d61fd9.

@Krinkle
Copy link
Member

A visual example ofCVE-2020-11022 (based on the tests from#4685).

CVE-2020-11022

odony, literalplus, r099u3, and vhulf reacted with heart emojir099u3 and vhulf reacted with eyes emoji

mgol added a commit to mgol/jquery that referenced this pull requestJun 5, 2020
The issue about selectors with '#' being broken is old and no longer frequentlyreported so this commit removes it from the list. On the other hand, we're nowgetting lots of reports about the security fix in jQuery 3.5.0 that was alsoa breaking change:jquerygh-4642. This one is now mentioned in the list.Refjquerygh-4642
mgol added a commit to mgol/jquery that referenced this pull requestJun 5, 2020
The issue about selectors with '#' being broken is old and no longer frequentlyreported so this commit removes it from the list. On the other hand, we're nowgetting lots of reports about the security fix in jQuery 3.5.0 that was alsoa breaking change:jquerygh-4642. This one is now mentioned in the list.Refjquerygh-4642
mgol added a commit that referenced this pull requestJun 8, 2020
The issue about selectors with '#' being broken is old and no longerfrequently reported so this commit removes it from the list. On the otherhand, we're now getting lots of reports about the security fix in jQuery 3.5.0that was also a breaking change:gh-4642. This one is now mentioned in thelist.Closesgh-4728Refgh-4642
serg-cymbaluk added a commit to serg-cymbaluk/freeipa that referenced this pull requestSep 21, 2020
The commit includes the following jQuery patches:- Manipulation: Make jQuery.htmlPrefilter an identity function  (jquery/jquery#4642)- Manipulation: Skip the select wrapper for <option> outside of IE 9  (jquery/jquery#4647)In addition there is included a script that helps to patch and buildthe new version of jQuery:  $ install/ui/util/make-jquery.js 3.4.1Ticket:https://pagure.io/freeipa/issue/8507Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com>
serg-cymbaluk added a commit to serg-cymbaluk/freeipa that referenced this pull requestSep 23, 2020
The commit includes the following jQuery patches:- Manipulation: Make jQuery.htmlPrefilter an identity function  (jquery/jquery#4642)- Manipulation: Skip the select wrapper for <option> outside of IE 9  (jquery/jquery#4647)In addition there is included a script that helps to patch and buildthe new version of jQuery:  $ install/ui/util/make-jquery.js 3.4.1Ticket:https://pagure.io/freeipa/issue/8507Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com>
mgol added a commit to mgol/jquery that referenced this pull requestSep 13, 2021
This ensures HTML wrapped in TrustedHTML can be used as an input to jQuerymanipulation methods in a way that doesn't violate the`require-trusted-types-for` Content Security Policy directive.This commit builds on previous work needed for trusted types support, includingjquerygh-4642 andjquerygh-4724.One restriction is that while any TrustedHTML wrapper should work as inputfor jQuery methods like `.html()` or `.append()`, for passing directly to the`jQuery` factory the string must start with `<` and end with `>`; no trailingor leading whitespaces are allowed. This is necessary as we cannot parse outa part of the input for further construction; that would violate the CSP rule -and that's what's done to HTML input not matching these constraints.No trusted types API is used explicitly in source; the majority of the work isensuring we don't pass the input converted to string to APIs that wouldeventually assign it to `innerHTML`. This extra cautiousness is caused by theAPI being Blink-only, at least for now.The ban on passing strings to `innerHTML` means support tests relying on suchassignments are impossible. We don't currently have such tests on the `main`branch but we used to have many of them in the 3.x & older lines. If there'sa need to re-add such a test, we'll need an escape hatch to skip them for appsneeding CSP-enforced TrustedHTML.Seehttps://web.dev/trusted-types/ for more information about TrustedHTML.Fixesjquerygh-4409Refjquerygh-4642Refjquerygh-4724
mgol added a commit to mgol/jquery that referenced this pull requestSep 14, 2021
This ensures HTML wrapped in TrustedHTML can be used as an input to jQuerymanipulation methods in a way that doesn't violate the`require-trusted-types-for` Content Security Policy directive.This commit builds on previous work needed for trusted types support, includingjquerygh-4642 andjquerygh-4724.One restriction is that while any TrustedHTML wrapper should work as inputfor jQuery methods like `.html()` or `.append()`, for passing directly to the`jQuery` factory the string must start with `<` and end with `>`; no trailingor leading whitespaces are allowed. This is necessary as we cannot parse outa part of the input for further construction; that would violate the CSP rule -and that's what's done to HTML input not matching these constraints.No trusted types API is used explicitly in source; the majority of the work isensuring we don't pass the input converted to string to APIs that wouldeventually assign it to `innerHTML`. This extra cautiousness is caused by theAPI being Blink-only, at least for now.The ban on passing strings to `innerHTML` means support tests relying on suchassignments are impossible. We don't currently have such tests on the `main`branch but we used to have many of them in the 3.x & older lines. If there'sa need to re-add such a test, we'll need an escape hatch to skip them for appsneeding CSP-enforced TrustedHTML.Seehttps://web.dev/trusted-types/ for more information about TrustedHTML.Fixesjquerygh-4409Refjquerygh-4642Refjquerygh-4724
mgol added a commit to mgol/jquery that referenced this pull requestSep 17, 2021
This ensures HTML wrapped in TrustedHTML can be used as an input to jQuerymanipulation methods in a way that doesn't violate the`require-trusted-types-for` Content Security Policy directive.This commit builds on previous work needed for trusted types support, includingjquerygh-4642 andjquerygh-4724.One restriction is that while any TrustedHTML wrapper should work as inputfor jQuery methods like `.html()` or `.append()`, for passing directly to the`jQuery` factory the string must start with `<` and end with `>`; no trailingor leading whitespaces are allowed. This is necessary as we cannot parse outa part of the input for further construction; that would violate the CSP rule -and that's what's done to HTML input not matching these constraints.No trusted types API is used explicitly in source; the majority of the work isensuring we don't pass the input converted to string to APIs that wouldeventually assign it to `innerHTML`. This extra cautiousness is caused by theAPI being Blink-only, at least for now.The ban on passing strings to `innerHTML` means support tests relying on suchassignments are impossible. We don't currently have such tests on the `main`branch but we used to have many of them in the 3.x & older lines. If there'sa need to re-add such a test, we'll need an escape hatch to skip them for appsneeding CSP-enforced TrustedHTML.Seehttps://web.dev/trusted-types/ for more information about TrustedHTML.Fixesjquerygh-4409Refjquerygh-4642Refjquerygh-4724
mgol added a commit to mgol/jquery that referenced this pull requestSep 23, 2021
This ensures HTML wrapped in TrustedHTML can be used as an input to jQuerymanipulation methods in a way that doesn't violate the`require-trusted-types-for` Content Security Policy directive.This commit builds on previous work needed for trusted types support, includingjquerygh-4642 andjquerygh-4724.One restriction is that while any TrustedHTML wrapper should work as inputfor jQuery methods like `.html()` or `.append()`, for passing directly to the`jQuery` factory the string must start with `<` and end with `>`; no trailingor leading whitespaces are allowed. This is necessary as we cannot parse outa part of the input for further construction; that would violate the CSP rule -and that's what's done to HTML input not matching these constraints.No trusted types API is used explicitly in source; the majority of the work isensuring we don't pass the input converted to string to APIs that wouldeventually assign it to `innerHTML`. This extra cautiousness is caused by theAPI being Blink-only, at least for now.The ban on passing strings to `innerHTML` means support tests relying on suchassignments are impossible. We don't currently have such tests on the `main`branch but we used to have many of them in the 3.x & older lines. If there'sa need to re-add such a test, we'll need an escape hatch to skip them for appsneeding CSP-enforced TrustedHTML.Seehttps://web.dev/trusted-types/ for more information about TrustedHTML.Fixesjquerygh-4409Refjquerygh-4642Refjquerygh-4724
mgol added a commit to mgol/jquery that referenced this pull requestSep 29, 2021
This ensures HTML wrapped in TrustedHTML can be used as an input to jQuerymanipulation methods in a way that doesn't violate the`require-trusted-types-for` Content Security Policy directive.This commit builds on previous work needed for trusted types support, includingjquerygh-4642 andjquerygh-4724.One restriction is that while any TrustedHTML wrapper should work as inputfor jQuery methods like `.html()` or `.append()`, for passing directly to the`jQuery` factory the string must start with `<` and end with `>`; no trailingor leading whitespaces are allowed. This is necessary as we cannot parse outa part of the input for further construction; that would violate the CSP rule -and that's what's done to HTML input not matching these constraints.No trusted types API is used explicitly in source; the majority of the work isensuring we don't pass the input converted to string to APIs that wouldeventually assign it to `innerHTML`. This extra cautiousness is caused by theAPI being Blink-only, at least for now.The ban on passing strings to `innerHTML` means support tests relying on suchassignments are impossible. We don't currently have such tests on the `main`branch but we used to have many of them in the 3.x & older lines. If there'sa need to re-add such a test, we'll need an escape hatch to skip them for appsneeding CSP-enforced TrustedHTML.Seehttps://web.dev/trusted-types/ for more information about TrustedHTML.Fixesjquerygh-4409Refjquerygh-4642Refjquerygh-4724
mgol added a commit to mgol/jquery that referenced this pull requestSep 29, 2021
This ensures HTML wrapped in TrustedHTML can be used as an input to jQuerymanipulation methods in a way that doesn't violate the`require-trusted-types-for` Content Security Policy directive.This commit builds on previous work needed for trusted types support, includingjquerygh-4642 andjquerygh-4724.One restriction is that while any TrustedHTML wrapper should work as inputfor jQuery methods like `.html()` or `.append()`, for passing directly to the`jQuery` factory the string must start with `<` and end with `>`; no trailingor leading whitespaces are allowed. This is necessary as we cannot parse outa part of the input for further construction; that would violate the CSP rule -and that's what's done to HTML input not matching these constraints.No trusted types API is used explicitly in source; the majority of the work isensuring we don't pass the input converted to string to APIs that wouldeventually assign it to `innerHTML`. This extra cautiousness is caused by theAPI being Blink-only, at least for now.The ban on passing strings to `innerHTML` means support tests relying on suchassignments are impossible. We don't currently have such tests on the `main`branch but we used to have many of them in the 3.x & older lines. If there'sa need to re-add such a test, we'll need an escape hatch to skip them for appsneeding CSP-enforced TrustedHTML.Seehttps://web.dev/trusted-types/ for more information about TrustedHTML.Fixesjquerygh-4409Refjquerygh-4642Refjquerygh-4724
mgol added a commit that referenced this pull requestSep 30, 2021
This ensures HTML wrapped in TrustedHTML can be used as an input to jQuerymanipulation methods in a way that doesn't violate the`require-trusted-types-for` Content Security Policy directive.This commit builds on previous work needed for trusted types support, includinggh-4642 andgh-4724.One restriction is that while any TrustedHTML wrapper should work as inputfor jQuery methods like `.html()` or `.append()`, for passing directly to the`jQuery` factory the string must start with `<` and end with `>`; no trailingor leading whitespaces are allowed. This is necessary as we cannot parse outa part of the input for further construction; that would violate the CSP rule -and that's what's done to HTML input not matching these constraints.No trusted types API is used explicitly in source; the majority of the work isensuring we don't pass the input converted to string to APIs that wouldeventually assign it to `innerHTML`. This extra cautiousness is caused by theAPI being Blink-only, at least for now.The ban on passing strings to `innerHTML` means support tests relying on suchassignments are impossible. We don't currently have such tests on the `main`branch but we used to have many of them in the 3.x & older lines. If there'sa need to re-add such a test, we'll need an escape hatch to skip them for appsneeding CSP-enforced TrustedHTML.Seehttps://web.dev/trusted-types/ for more information about TrustedHTML.Fixesgh-4409Closesgh-4927Refgh-4642Refgh-4724
tamcy pushed a commit to tamcy/jquery that referenced this pull requestMar 17, 2022
Closesjquerygh-4642(cherry picked from90fed4b)# Conflicts:#src/manipulation.js#test/data/testinit.js#test/unit/ajax.js#test/unit/attributes.js#test/unit/basic.js#test/unit/core.js#test/unit/css.js#test/unit/data.js#test/unit/deprecated.js#test/unit/dimensions.js#test/unit/effects.js#test/unit/event.js#test/unit/manipulation.js#test/unit/offset.js#test/unit/traversing.js
msablic added a commit to msablic/jquery that referenced this pull requestSep 29, 2022
rickypowell pushed a commit to draios/jquery that referenced this pull requestMar 12, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timmywiltimmywiltimmywil approved these changes

Assignees

@mgolmgol

Milestone
3.5.0
Development

Successfully merging this pull request may close these issues.

3 participants
@mgol@Krinkle@timmywil

[8]ページ先頭

©2009-2025 Movatter.jp