Bump sanitize from 4.0.0 to 5.2.1
Bumps sanitize from 4.0.0 to 5.2.1.
Release notes
Sourced from sanitize's releases.
v5.2.1
Bug Fixes
Fixed an HTML sanitization bypass that could allow XSS. This issue affects Sanitize versions 3.0.0 through 5.2.0.
When HTML was sanitized using the "relaxed" config or a custom config that allows certain elements, some content in a
<math>or<svg>element may not have beeen sanitized correctly even ifmathandsvgwere not in the allowlist. This could allow carefully crafted input to sneak arbitrary HTML through Sanitize, potentially enabling an XSS (cross-site scripting) attack.You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements:
iframemathnoembednoframesnoscriptplaintextscriptstylesvgxmpSee the security advisory for more details, including a workaround if you're not able to upgrade: GHSA-p4x4-rw2p-8j8m
Many thanks to Michał Bentkowski of Securitum for reporting this issue and helping to verify the fix.
v5.2.0
Changes
The term "whitelist" has been replaced with "allowlist" throughout Sanitize's source and documentation.
While the etymology of "whitelist" may not be explicitly racist in origin or intent, there are inherent racial connotations in the implication that white is good and black (as in "blacklist") is not.
This is a change I should have made long ago, and I apologize for not making it sooner.
In transformer input, the
:is_whitelistedand:node_whitelistkeys are now deprecated. New:is_allowlistedand:node_allowlistkeys have been added. The old keys will continue to work in order to avoid breaking existing code, but they are no longer documented and may be removed in a future semver major release.v5.1.0
Features
- Added a
:parser_optionsconfig hash, which makes it possible to pass custom parsing options to Nokogumbo. [@austin-wang - #194]194Bug Fixes
... (truncated)
- Non-characters and non-whitespace control characters are now stripped from HTML input before parsing to comply with the HTML Standard's preprocessing guidelines. Prior to this Sanitize had adhered to older W3C guidelines that have since been withdrawn. #179179
Changelog
Sourced from sanitize's changelog.
5.2.1 (2020-06-16)
Bug Fixes
Fixed an HTML sanitization bypass that could allow XSS. This issue affects Sanitize versions 3.0.0 through 5.2.0.
When HTML was sanitized using the "relaxed" config or a custom config that allows certain elements, some content in a
<math>or<svg>element may not have beeen sanitized correctly even ifmathandsvgwere not in the allowlist. This could allow carefully crafted input to sneak arbitrary HTML through Sanitize, potentially enabling an XSS (cross-site scripting) attack.You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements:
iframemathnoembednoframesnoscriptplaintextscriptstylesvgxmpSee the security advisory for more details, including a workaround if you're not able to upgrade: GHSA-p4x4-rw2p-8j8m
Many thanks to Michał Bentkowski of Securitum for reporting this issue and helping to verify the fix.
5.2.0 (2020-06-06)
Changes
... (truncated)
The term "whitelist" has been replaced with "allowlist" throughout Sanitize's source and documentation.
While the etymology of "whitelist" may not be explicitly racist in origin or intent, there are inherent racial connotations in the implication that white is good and black (as in "blacklist") is not.
This is a change I should have made long ago, and I apologize for not making it sooner.
Commits
773d1afRelease 5.2.1a11498dFix sanitization bypass in HTML foreign content1d0d688Update the "Supported Versions" policy to be more realistic4166da2Release 5.2.03c78c7eAdd Ruby 2.7.x to the test matrix78fbcc3Stop using the term "whitelist"c90bcb1Merge pull request #199 from flavorjones/flavorjones-skip-nokogiri-patch-tests21da9b6Avoid testing nokogiri's patch when using system libxml2245c705Release 5.1.00d4158fStrip control characters and non-characters before parsing- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) -
@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language -
@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language -
@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language -
@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.