Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/cure53/DOMPurify into main
Browse files Browse the repository at this point in the history
  • Loading branch information
peernohell committed Sep 2, 2020
2 parents a0499ba + e2b2a09 commit eca5522
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 9 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "CodeQL"

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '0 19 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion dist/purify.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.cjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.es.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/purify.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function createDOMPurify(window = getGlobal()) {
* DOMPurify. */
let RETURN_DOM_IMPORT = false;

/* Try to return a Trusted Type object instead of a string, retrun a string in
/* Try to return a Trusted Type object instead of a string, return a string in
* case Trusted Types are not supported */
let RETURN_TRUSTED_TYPE = false;

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/expect.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module.exports = [
}, {
"title": "onsubmit, onfocus; DOM clobbering: nodeName",
"payload": "<form onsubmit=alert(1)><input onfocus=alert(2) name=nodeName>123</form>",
"expected": ["", "<form><input>123</form>"]
"expected": ["", "<form><input>123</form>", "<input>123"]
}, {
"title": "onsubmit, onfocus; DOM clobbering: nodeType",
"payload": "<form onsubmit=alert(1)><input onfocus=alert(2) name=nodeType>123</form>",
Expand Down

0 comments on commit eca5522

Please sign in to comment.