Skip to content

Commit 03be8be

Browse files
Release build 4.4.3 [ci release]
1 parent 1e7149f commit 03be8be

File tree

12 files changed

+99
-23
lines changed

12 files changed

+99
-23
lines changed

Sources/ContentScopeScripts/dist/contentScope.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8647,7 +8647,7 @@
86478647

86488648
let elementRemovalTimeout;
86498649
const featureName = 'runtimeChecks';
8650-
const symbol = Symbol(featureName);
8650+
const taintSymbol = Symbol(featureName);
86518651
const supportedSinks = ['src'];
86528652

86538653
class DDGRuntimeChecks extends HTMLElement {
@@ -8725,7 +8725,7 @@
87258725

87268726
if (taintCheck) {
87278727
// Add a symbol to the element so we can identify it as a runtime checked element
8728-
Object.defineProperty(el, symbol, { value: true, configurable: false, enumerable: false, writable: false });
8728+
Object.defineProperty(el, taintSymbol, { value: true, configurable: false, enumerable: false, writable: false });
87298729
}
87308730

87318731
// Reflect all attrs to the new element
@@ -8939,7 +8939,7 @@
89398939
if (matchAllStackDomains) {
89408940
return true
89418941
}
8942-
if (taintCheck && document.currentScript[symbol]) {
8942+
if (taintCheck && document.currentScript?.[taintSymbol]) {
89438943
return true
89448944
}
89458945
const stack = getStack();

build/android/contentScope.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8647,7 +8647,7 @@
86478647

86488648
let elementRemovalTimeout;
86498649
const featureName = 'runtimeChecks';
8650-
const symbol = Symbol(featureName);
8650+
const taintSymbol = Symbol(featureName);
86518651
const supportedSinks = ['src'];
86528652

86538653
class DDGRuntimeChecks extends HTMLElement {
@@ -8725,7 +8725,7 @@
87258725

87268726
if (taintCheck) {
87278727
// Add a symbol to the element so we can identify it as a runtime checked element
8728-
Object.defineProperty(el, symbol, { value: true, configurable: false, enumerable: false, writable: false });
8728+
Object.defineProperty(el, taintSymbol, { value: true, configurable: false, enumerable: false, writable: false });
87298729
}
87308730

87318731
// Reflect all attrs to the new element
@@ -8939,7 +8939,7 @@
89398939
if (matchAllStackDomains) {
89408940
return true
89418941
}
8942-
if (taintCheck && document.currentScript[symbol]) {
8942+
if (taintCheck && document.currentScript?.[taintSymbol]) {
89438943
return true
89448944
}
89458945
const stack = getStack();

build/chrome-mv3/inject.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8581,7 +8581,7 @@
85818581

85828582
let elementRemovalTimeout;
85838583
const featureName = 'runtimeChecks';
8584-
const symbol = Symbol(featureName);
8584+
const taintSymbol = Symbol(featureName);
85858585
const supportedSinks = ['src'];
85868586

85878587
class DDGRuntimeChecks extends HTMLElement {
@@ -8659,7 +8659,7 @@
86598659

86608660
if (taintCheck) {
86618661
// Add a symbol to the element so we can identify it as a runtime checked element
8662-
Object.defineProperty(el, symbol, { value: true, configurable: false, enumerable: false, writable: false });
8662+
Object.defineProperty(el, taintSymbol, { value: true, configurable: false, enumerable: false, writable: false });
86638663
}
86648664

86658665
// Reflect all attrs to the new element
@@ -8873,7 +8873,7 @@
88738873
if (matchAllStackDomains) {
88748874
return true
88758875
}
8876-
if (taintCheck && document.currentScript[symbol]) {
8876+
if (taintCheck && document.currentScript?.[taintSymbol]) {
88778877
return true
88788878
}
88798879
const stack = getStack();

build/chrome/inject.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/firefox/inject.js

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

build/integration/contentScope.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8560,7 +8560,7 @@
85608560

85618561
let elementRemovalTimeout;
85628562
const featureName = 'runtimeChecks';
8563-
const symbol = Symbol(featureName);
8563+
const taintSymbol = Symbol(featureName);
85648564
const supportedSinks = ['src'];
85658565

85668566
class DDGRuntimeChecks extends HTMLElement {
@@ -8638,7 +8638,7 @@
86388638

86398639
if (taintCheck) {
86408640
// Add a symbol to the element so we can identify it as a runtime checked element
8641-
Object.defineProperty(el, symbol, { value: true, configurable: false, enumerable: false, writable: false });
8641+
Object.defineProperty(el, taintSymbol, { value: true, configurable: false, enumerable: false, writable: false });
86428642
}
86438643

86448644
// Reflect all attrs to the new element
@@ -8852,7 +8852,7 @@
88528852
if (matchAllStackDomains) {
88538853
return true
88548854
}
8855-
if (taintCheck && document.currentScript[symbol]) {
8855+
if (taintCheck && document.currentScript?.[taintSymbol]) {
88568856
return true
88578857
}
88588858
const stack = getStack();

build/windows/contentScope.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8649,7 +8649,7 @@
86498649

86508650
let elementRemovalTimeout;
86518651
const featureName = 'runtimeChecks';
8652-
const symbol = Symbol(featureName);
8652+
const taintSymbol = Symbol(featureName);
86538653
const supportedSinks = ['src'];
86548654

86558655
class DDGRuntimeChecks extends HTMLElement {
@@ -8727,7 +8727,7 @@
87278727

87288728
if (taintCheck) {
87298729
// Add a symbol to the element so we can identify it as a runtime checked element
8730-
Object.defineProperty(el, symbol, { value: true, configurable: false, enumerable: false, writable: false });
8730+
Object.defineProperty(el, taintSymbol, { value: true, configurable: false, enumerable: false, writable: false });
87318731
}
87328732

87338733
// Reflect all attrs to the new element
@@ -8941,7 +8941,7 @@
89418941
if (matchAllStackDomains) {
89428942
return true
89438943
}
8944-
if (taintCheck && document.currentScript[symbol]) {
8944+
if (taintCheck && document.currentScript?.[taintSymbol]) {
89458945
return true
89468946
}
89478947
const stack = getStack();
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<html lang="en">
2+
<body>
3+
<h1>Check for stack tracing</h1>
4+
<script src="script.js"></script>
5+
</body>
6+
</html>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function init () {
2+
window.script1Ran = true
3+
const script = document.createElement('script')
4+
script.src = './script2.js'
5+
script.id = 'script2'
6+
script.setAttribute('magicalAttribute', 'yes')
7+
document.body.appendChild(script)
8+
}
9+
// Wait for setup
10+
window.addEventListener('initialize', (e) => {
11+
init()
12+
})
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
window.script2Ran = true
2+
window.dispatchEvent(new CustomEvent('initializeFinished'))

0 commit comments

Comments
 (0)