@whotracksme/reporting 5.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/.eslintignore +3 -0
- package/.eslintrc +16 -0
- package/.github/workflows/release.yml +34 -0
- package/.github/workflows/tests.yml +20 -0
- package/.prettierrc +9 -0
- package/.tool-versions +1 -0
- package/CHANGELOG.md +795 -0
- package/LICENSE +373 -0
- package/README.md +1 -0
- package/communication/README.md +11 -0
- package/communication/example/index.js +43 -0
- package/communication/example/manifest.json +16 -0
- package/communication/karma.conf.cjs +19 -0
- package/communication/package.json +52 -0
- package/communication/rollup.common-config.cjs +17 -0
- package/communication/rollup.config.cjs +10 -0
- package/communication/src/encoding.js +54 -0
- package/communication/src/errors.js +84 -0
- package/communication/src/index.js +76 -0
- package/communication/src/logger.js +41 -0
- package/communication/src/padding.js +60 -0
- package/communication/src/proxied-http.js +231 -0
- package/communication/src/server-public-key-accessor.js +123 -0
- package/communication/src/timestamps.js +37 -0
- package/communication/src/trusted-clock.js +58 -0
- package/communication/src/utils.js +28 -0
- package/communication/src/zlib.js +17 -0
- package/communication/test/helpers/in-memory-database.js +43 -0
- package/communication/test/server-public-key-accessor.spec.js +135 -0
- package/communication/test/utils.spec.js +43 -0
- package/package.json +50 -0
- package/reporting/TODO.md +2 -0
- package/reporting/assets/request/bloom_filter.dat +0 -0
- package/reporting/assets/request/update.json +1 -0
- package/reporting/example/content.js +11 -0
- package/reporting/example/index.js +132 -0
- package/reporting/example/inspector/index.html +17 -0
- package/reporting/example/inspector/index.js +27 -0
- package/reporting/example/manifests/chromium.json +37 -0
- package/reporting/example/manifests/firefox.json +35 -0
- package/reporting/example/rules.json +62 -0
- package/reporting/example/setup.js +1 -0
- package/reporting/example/tests/test1.html +10 -0
- package/reporting/karma.conf.cjs +22 -0
- package/reporting/package.json +63 -0
- package/reporting/rollup.common-config.cjs +19 -0
- package/reporting/rollup.config.cjs +20 -0
- package/reporting/src/LRU.js +149 -0
- package/reporting/src/activity-estimator.js +298 -0
- package/reporting/src/alive-check.js +139 -0
- package/reporting/src/alive-message-generator.js +142 -0
- package/reporting/src/bloom-filters.js +345 -0
- package/reporting/src/country-provider.js +295 -0
- package/reporting/src/cyrb53.js +32 -0
- package/reporting/src/digest.js +33 -0
- package/reporting/src/doublefetch-page-handler.js +548 -0
- package/reporting/src/duplicate-detector.js +233 -0
- package/reporting/src/errors.js +84 -0
- package/reporting/src/event-listener-queue.js +121 -0
- package/reporting/src/fixed-size-cache.js +63 -0
- package/reporting/src/hash-detector.js +1526 -0
- package/reporting/src/html-parser.js +17 -0
- package/reporting/src/http.js +265 -0
- package/reporting/src/index.js +14 -0
- package/reporting/src/job-scheduler.js +912 -0
- package/reporting/src/logger.js +121 -0
- package/reporting/src/md5.js +334 -0
- package/reporting/src/message-sender.js +51 -0
- package/reporting/src/network.js +140 -0
- package/reporting/src/new-page-approver.js +119 -0
- package/reporting/src/page-aggregator.js +185 -0
- package/reporting/src/page-quorum-check-handler.js +200 -0
- package/reporting/src/page-structure.js +136 -0
- package/reporting/src/pagedb.js +671 -0
- package/reporting/src/pages.js +1798 -0
- package/reporting/src/patterns-updater.js +310 -0
- package/reporting/src/patterns.js +416 -0
- package/reporting/src/persisted-bitarray.js +265 -0
- package/reporting/src/persisted-hashes.js +189 -0
- package/reporting/src/quorum-checker.js +327 -0
- package/reporting/src/random.js +39 -0
- package/reporting/src/reporting.js +290 -0
- package/reporting/src/request/config.js +116 -0
- package/reporting/src/request/content-script.js +77 -0
- package/reporting/src/request/database.js +147 -0
- package/reporting/src/request/dnt.js +24 -0
- package/reporting/src/request/hash.js +101 -0
- package/reporting/src/request/index.js +874 -0
- package/reporting/src/request/page-telemetry.js +42 -0
- package/reporting/src/request/qs-whitelist2.js +247 -0
- package/reporting/src/request/resources/prob.js +601 -0
- package/reporting/src/request/steps/block-rules.js +40 -0
- package/reporting/src/request/steps/check-context.js +37 -0
- package/reporting/src/request/steps/cookie-context.js +209 -0
- package/reporting/src/request/steps/oauth-detector.js +101 -0
- package/reporting/src/request/steps/page-logger.js +177 -0
- package/reporting/src/request/steps/redirect-tagger.js +75 -0
- package/reporting/src/request/steps/subdomain-check.js +34 -0
- package/reporting/src/request/steps/token-checker/index.js +189 -0
- package/reporting/src/request/steps/token-checker/token-domain.js +129 -0
- package/reporting/src/request/steps/token-examiner.js +182 -0
- package/reporting/src/request/steps/token-telemetry/cached-entry-pipeline.js +210 -0
- package/reporting/src/request/steps/token-telemetry/index.js +234 -0
- package/reporting/src/request/steps/token-telemetry/key-pipeline.js +109 -0
- package/reporting/src/request/steps/token-telemetry/token-pipeline.js +105 -0
- package/reporting/src/request/time.js +73 -0
- package/reporting/src/request/utils/bloom-filter-packed.js +107 -0
- package/reporting/src/request/utils/chrome-storage-map.js +282 -0
- package/reporting/src/request/utils/subject.js +37 -0
- package/reporting/src/request/utils/temp-set.js +56 -0
- package/reporting/src/request/utils/tlds.js +55 -0
- package/reporting/src/request/utils.js +41 -0
- package/reporting/src/request-reporter.js +111 -0
- package/reporting/src/sanitizer.js +519 -0
- package/reporting/src/search-extractor.js +338 -0
- package/reporting/src/self-check.js +105 -0
- package/reporting/src/seq-executor.js +43 -0
- package/reporting/src/session-storage.js +399 -0
- package/reporting/src/url-analyzer.js +161 -0
- package/reporting/src/url-cleaner.js +60 -0
- package/reporting/src/utils/pacemaker.js +279 -0
- package/reporting/src/utils/url.js +114 -0
- package/reporting/src/utils.js +345 -0
- package/reporting/src/webrequest-pipeline/cname-uncloak.js +110 -0
- package/reporting/src/webrequest-pipeline/index.js +287 -0
- package/reporting/src/webrequest-pipeline/logger.js +14 -0
- package/reporting/src/webrequest-pipeline/page-store.js +282 -0
- package/reporting/src/webrequest-pipeline/page.js +140 -0
- package/reporting/src/webrequest-pipeline/pipeline.js +249 -0
- package/reporting/src/webrequest-pipeline/utils/webrequest.js +113 -0
- package/reporting/src/webrequest-pipeline/webrequest-context.js +153 -0
- package/reporting/test/README.md +2 -0
- package/reporting/test/activity-estimator.spec.js +356 -0
- package/reporting/test/alive-check.spec.js +156 -0
- package/reporting/test/alive-message-generator.spec.js +186 -0
- package/reporting/test/country-provider.spec.js +263 -0
- package/reporting/test/doublefetch-page-handler.spec.js +818 -0
- package/reporting/test/duplicate-detector.spec.js +689 -0
- package/reporting/test/helpers/dom-parsers.js +41 -0
- package/reporting/test/helpers/fake-session-storage.js +69 -0
- package/reporting/test/helpers/fast-check-utils.js +28 -0
- package/reporting/test/helpers/fetch-mock.js +57 -0
- package/reporting/test/helpers/in-memory-database.js +14 -0
- package/reporting/test/helpers/memory-map.js +72 -0
- package/reporting/test/helpers/pagedb-mocks.js +41 -0
- package/reporting/test/index.js +47 -0
- package/reporting/test/job-scheduler.spec.js +691 -0
- package/reporting/test/network.spec.js +72 -0
- package/reporting/test/page-aggregator.spec.js +104 -0
- package/reporting/test/page-quorum-check-handler.spec.js +86 -0
- package/reporting/test/pagedb.spec.js +250 -0
- package/reporting/test/pages.spec.js +693 -0
- package/reporting/test/patterns-updater.spec.js +446 -0
- package/reporting/test/patterns.spec.js +751 -0
- package/reporting/test/persisted-hashes.spec.js +169 -0
- package/reporting/test/reporting.spec.js +205 -0
- package/reporting/test/request/database.spec.js +59 -0
- package/reporting/test/request/hash.spec.js +108 -0
- package/reporting/test/request/index.spec.js +378 -0
- package/reporting/test/request/qs-whitelist2.spec.js +189 -0
- package/reporting/test/request/steps/check-context.spec.js +51 -0
- package/reporting/test/request/steps/oauth-detector.spec.js +339 -0
- package/reporting/test/request/test-pages.js +1246 -0
- package/reporting/test/request/utils/bloom-filter-packed.spec.js +37 -0
- package/reporting/test/request/utils/chrome-storage-map.spec.js +28 -0
- package/reporting/test/request/utils/tldts.spec.js +62 -0
- package/reporting/test/request/utils.spec.js +168 -0
- package/reporting/test/sanitizer.spec.js +1087 -0
- package/reporting/test/search-extractor.spec.js +590 -0
- package/reporting/test/seq-executor.spec.js +158 -0
- package/reporting/test/session-storage.spec.js +400 -0
- package/reporting/test/setup.js +24 -0
- package/reporting/test/url-analyzer.spec.js +451 -0
- package/reporting/test/url-cleaner.spec.js +102 -0
- package/reporting/test/utils/pacemaker.spec.js +222 -0
- package/reporting/test/utils/url.spec.js +660 -0
- package/reporting/test/utils.spec.js +299 -0
- package/reporting/test/webrequest-pipeline/pipeline.spec.js +251 -0
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WhoTracks.Me
|
|
3
|
+
* https://whotracks.me/
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2017-present Ghostery GmbH. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
8
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
9
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { expect } from 'chai';
|
|
13
|
+
import fc from 'fast-check';
|
|
14
|
+
|
|
15
|
+
import { lookupBuiltinTransform } from '../src/patterns.js';
|
|
16
|
+
|
|
17
|
+
describe('Test builtin primitives', function () {
|
|
18
|
+
describe('#queryParam', function () {
|
|
19
|
+
let queryParam;
|
|
20
|
+
|
|
21
|
+
beforeEach(function () {
|
|
22
|
+
queryParam = lookupBuiltinTransform('queryParam');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe('core functionality', function () {
|
|
26
|
+
it('["https://example.test/path?foo=bar+baz", "foo"] -> "bar baz"', function () {
|
|
27
|
+
expect(
|
|
28
|
+
queryParam('https://example.test/path?foo=bar+baz', 'foo'),
|
|
29
|
+
).to.eql('bar baz');
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('["/example.test/path?foo=bar+baz", "foo"] -> "bar baz"', function () {
|
|
33
|
+
expect(queryParam('/example.test/path?foo=bar+baz', 'foo')).to.eql(
|
|
34
|
+
'bar baz',
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('["/example.test/path", "foo"] -> null', function () {
|
|
39
|
+
expect(queryParam('/example.test/path', 'foo')).to.be.null;
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('["This is a string but not an URL", "foo"] -> null', function () {
|
|
43
|
+
expect(queryParam('This is a string but not an URL', 'foo')).to.be.null;
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
describe('robustness on untrusted data', function () {
|
|
48
|
+
it('should fail if input is not [string, string] (more parameters are ignored)', function () {
|
|
49
|
+
expect(() => queryParam()).to.throw();
|
|
50
|
+
expect(() => queryParam('too few args')).to.throw();
|
|
51
|
+
expect(() => queryParam({ wrong: 'types' }, 42)).to.throw();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('should not fail on well-formed but arbitrary text', function () {
|
|
55
|
+
fc.assert(
|
|
56
|
+
fc.property(fc.fullUnicodeString(), (untrustedText) => {
|
|
57
|
+
// should not throw
|
|
58
|
+
queryParam(untrustedText, 'someTrustedParam');
|
|
59
|
+
}),
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('should not fail on well-formed but arbitrary URLs', function () {
|
|
64
|
+
fc.assert(
|
|
65
|
+
fc.property(fc.webUrl(), (untrustedUrl) => {
|
|
66
|
+
// should not throw
|
|
67
|
+
queryParam(untrustedUrl, 'someTrustedParam');
|
|
68
|
+
}),
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
describe('#removeParams', function () {
|
|
75
|
+
let removeParams;
|
|
76
|
+
|
|
77
|
+
beforeEach(function () {
|
|
78
|
+
removeParams = lookupBuiltinTransform('removeParams');
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
describe('core functionality', function () {
|
|
82
|
+
it('should allow to remove one query parameter', function () {
|
|
83
|
+
expect(
|
|
84
|
+
removeParams('https://example.test/path?foo=remove&bar=keep', [
|
|
85
|
+
'foo',
|
|
86
|
+
]),
|
|
87
|
+
).to.eql('https://example.test/path?bar=keep');
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it('should allow to remove multiple parameter', function () {
|
|
91
|
+
expect(
|
|
92
|
+
removeParams('https://example.test/path?foo=remove&bar=remove#keep', [
|
|
93
|
+
'foo',
|
|
94
|
+
'bar',
|
|
95
|
+
]),
|
|
96
|
+
).to.eql('https://example.test/path#keep');
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it('should accept empty list', function () {
|
|
100
|
+
expect(
|
|
101
|
+
removeParams('https://example.test/path?foo=foo&bar=bar#hash', []),
|
|
102
|
+
).to.eql('https://example.test/path?foo=foo&bar=bar#hash');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('should remove all occurrences of a query parameter', function () {
|
|
106
|
+
expect(
|
|
107
|
+
removeParams('https://example.test/path?foo=first&foo=second', [
|
|
108
|
+
'foo',
|
|
109
|
+
]),
|
|
110
|
+
).to.eql('https://example.test/path');
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it('should work on simple URLs without query parameters', function () {
|
|
114
|
+
expect(removeParams('https://example.test/', [])).to.eql(
|
|
115
|
+
'https://example.test/',
|
|
116
|
+
);
|
|
117
|
+
expect(removeParams('https://example.test/', ['x'])).to.eql(
|
|
118
|
+
'https://example.test/',
|
|
119
|
+
);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
it('should work on key-only query parameters', function () {
|
|
123
|
+
expect(removeParams('https://example.test/foo?bar', [])).to.eql(
|
|
124
|
+
'https://example.test/foo?bar',
|
|
125
|
+
);
|
|
126
|
+
expect(removeParams('https://example.test/foo?bar', ['x'])).to.eql(
|
|
127
|
+
'https://example.test/foo?bar',
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
expect(removeParams('https://example.test/foo?bar=', [])).to.eql(
|
|
131
|
+
'https://example.test/foo?bar=',
|
|
132
|
+
);
|
|
133
|
+
expect(removeParams('https://example.test/foo?bar=', ['x'])).to.eql(
|
|
134
|
+
'https://example.test/foo?bar=',
|
|
135
|
+
);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
describe('should preserve information in the query string', function () {
|
|
139
|
+
it('should keep plus-encoded white spaces untouched', function () {
|
|
140
|
+
expect(
|
|
141
|
+
removeParams(
|
|
142
|
+
'https://example.test/path?foo=one+two+three&bar=one+two+three',
|
|
143
|
+
['foo'],
|
|
144
|
+
),
|
|
145
|
+
).to.eql('https://example.test/path?bar=one+two+three');
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
it('should keep percent-encoded white spaces untouched', function () {
|
|
149
|
+
expect(
|
|
150
|
+
removeParams(
|
|
151
|
+
'https://example.test/path?foo=one%20two%20three&bar=one%20two%20three',
|
|
152
|
+
['foo'],
|
|
153
|
+
),
|
|
154
|
+
).to.eql('https://example.test/path?bar=one%20two%20three');
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('should preserve different representations of white spaces', function () {
|
|
158
|
+
const url =
|
|
159
|
+
'https://example.test/path?foo=one%20two%+three four++5&bar,baz';
|
|
160
|
+
for (const nonExistingParams of [
|
|
161
|
+
[],
|
|
162
|
+
['does-not-exist'],
|
|
163
|
+
['does', 'not', 'exist'],
|
|
164
|
+
]) {
|
|
165
|
+
expect(removeParams(url, nonExistingParams)).to.eql(url);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
describe('should support ULRs with non-ascii letters', function () {
|
|
171
|
+
it('should handle Arabic', function () {
|
|
172
|
+
const url =
|
|
173
|
+
'http://abouwadi3-music.blogspot.com/search/label/مالوف تونسي?updated-max=2013-07-09T19:13:00-07:00&max-results=20&start=19&by-date=false&m=0';
|
|
174
|
+
expect(removeParams(url, [])).to.eql(url);
|
|
175
|
+
expect(removeParams(url, ['does-not-exist'])).to.eql(url);
|
|
176
|
+
expect(removeParams(url, ['updated-max'])).to.eql(
|
|
177
|
+
'http://abouwadi3-music.blogspot.com/search/label/مالوف تونسي?max-results=20&start=19&by-date=false&m=0',
|
|
178
|
+
);
|
|
179
|
+
expect(removeParams(url, ['updated-max', 'max-results'])).to.eql(
|
|
180
|
+
'http://abouwadi3-music.blogspot.com/search/label/مالوف تونسي?start=19&by-date=false&m=0',
|
|
181
|
+
);
|
|
182
|
+
expect(
|
|
183
|
+
removeParams(url, [
|
|
184
|
+
'updated-max',
|
|
185
|
+
'max-results',
|
|
186
|
+
'start',
|
|
187
|
+
'by-date',
|
|
188
|
+
'm',
|
|
189
|
+
]),
|
|
190
|
+
).to.eql(
|
|
191
|
+
'http://abouwadi3-music.blogspot.com/search/label/مالوف تونسي',
|
|
192
|
+
);
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
// To get some confidence, the hand-written code should behave identical
|
|
197
|
+
// in simple cases, when there are only simple strings ([a-z0-9]*).
|
|
198
|
+
// Using simple string, avoid all problematic encoding issues.
|
|
199
|
+
it('should behave like searchParams in simple cases', function () {
|
|
200
|
+
fc.assert(
|
|
201
|
+
fc.property(
|
|
202
|
+
fc.webUrl({ withQueryParameters: true, withFragments: true }),
|
|
203
|
+
fc.array(fc.tuple(fc.hexaString(), fc.hexaString())),
|
|
204
|
+
fc.array(fc.hexaString()),
|
|
205
|
+
(url, paramsToAdd, paramsToRemove) => {
|
|
206
|
+
const tmp1 = new URL(url);
|
|
207
|
+
tmp1.search = new URLSearchParams(paramsToAdd);
|
|
208
|
+
const urlPlusParams = tmp1.toString();
|
|
209
|
+
|
|
210
|
+
const tmp2 = new URL(urlPlusParams);
|
|
211
|
+
for (const param of paramsToRemove) {
|
|
212
|
+
tmp2.searchParams.delete(param);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const expected = tmp2.toString();
|
|
216
|
+
const actual = removeParams(urlPlusParams, paramsToRemove);
|
|
217
|
+
expect(actual).to.eql(expected);
|
|
218
|
+
},
|
|
219
|
+
),
|
|
220
|
+
);
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
describe('should return null for invalid URIs', function () {
|
|
224
|
+
['This is a string but not an URL', '%', '%%', '-%-'].forEach(
|
|
225
|
+
(invalidURI) => {
|
|
226
|
+
it(`invalid URI: ${invalidURI}`, function () {
|
|
227
|
+
expect(removeParams(invalidURI, ['foo'])).to.be.null;
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
);
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
it('the order of the parameters should not impact the results', function () {
|
|
235
|
+
fc.assert(
|
|
236
|
+
fc.property(
|
|
237
|
+
fc.webUrl({ withQueryParameters: true, withFragments: true }),
|
|
238
|
+
fc.array(fc.string()),
|
|
239
|
+
(url, extraParams) => {
|
|
240
|
+
const allParams = extraParams.concat(
|
|
241
|
+
[...new URL(url).searchParams].map((x) => x[0]),
|
|
242
|
+
);
|
|
243
|
+
for (let i = 0; i < allParams.length; i += 1) {
|
|
244
|
+
const params = allParams.slice(0, i);
|
|
245
|
+
const result1 = removeParams(url, params);
|
|
246
|
+
const result2 = removeParams(url, [...params, ...params]);
|
|
247
|
+
const result3 = removeParams(url, [
|
|
248
|
+
...params.toSorted(),
|
|
249
|
+
...params.toReversed(),
|
|
250
|
+
]);
|
|
251
|
+
expect(result1).to.eql(result2);
|
|
252
|
+
expect(result1).to.eql(result3);
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
),
|
|
256
|
+
);
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
it('listing parameters multiple times should not impact the results', function () {
|
|
260
|
+
fc.assert(
|
|
261
|
+
fc.property(
|
|
262
|
+
fc.webUrl({ withQueryParameters: true, withFragments: true }),
|
|
263
|
+
fc.array(fc.string()),
|
|
264
|
+
(url, extraParams) => {
|
|
265
|
+
const allParams = extraParams.concat(
|
|
266
|
+
[...new URL(url).searchParams].map((x) => x[0]),
|
|
267
|
+
);
|
|
268
|
+
for (let i = 0; i < allParams.length; i += 1) {
|
|
269
|
+
const params = allParams.slice(0, i);
|
|
270
|
+
const result1 = removeParams(url, params);
|
|
271
|
+
const result2 = removeParams(url, params.toSorted());
|
|
272
|
+
const result3 = removeParams(url, params.toReversed());
|
|
273
|
+
expect(result1).to.eql(result2);
|
|
274
|
+
expect(result1).to.eql(result3);
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
),
|
|
278
|
+
);
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
describe('robustness on untrusted data', function () {
|
|
282
|
+
it('should fail if input is not [string] (more parameters are ignored)', function () {
|
|
283
|
+
expect(() => removeParams()).to.throw();
|
|
284
|
+
expect(() => removeParams('too few arguments')).to.throw();
|
|
285
|
+
expect(() => removeParams({ wrong: 'types' }, 42)).to.throw();
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
it('should not fail on well-formed but arbitrary text', function () {
|
|
289
|
+
fc.assert(
|
|
290
|
+
fc.property(fc.fullUnicodeString(), (untrustedText) => {
|
|
291
|
+
const result = removeParams(untrustedText, ['someTrustedParam']);
|
|
292
|
+
if (result !== null) {
|
|
293
|
+
expect(result).to.be.a('string');
|
|
294
|
+
expect(URL.canParse(result)).to.be.true;
|
|
295
|
+
}
|
|
296
|
+
}),
|
|
297
|
+
);
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
it('should not fail on well-formed but arbitrary URLs', function () {
|
|
301
|
+
fc.assert(
|
|
302
|
+
fc.property(
|
|
303
|
+
fc.webUrl({ withQueryParameters: true, withFragments: true }),
|
|
304
|
+
(untrustedUrl) => {
|
|
305
|
+
const result = removeParams(untrustedUrl, ['someTrustedParam']);
|
|
306
|
+
if (result !== null) {
|
|
307
|
+
expect(result).to.be.a('string');
|
|
308
|
+
expect(URL.canParse(result)).to.be.true;
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
),
|
|
312
|
+
);
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
describe('#requireURL', function () {
|
|
318
|
+
let requireURL;
|
|
319
|
+
|
|
320
|
+
beforeEach(function () {
|
|
321
|
+
requireURL = lookupBuiltinTransform('requireURL');
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
describe('core functionality', function () {
|
|
325
|
+
it('should accept a valid URL', function () {
|
|
326
|
+
const url = 'https://example.test/some?valid=url#foo';
|
|
327
|
+
expect(requireURL(url)).to.eql(url);
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
it('should replace an invalid URL by null', function () {
|
|
331
|
+
expect(requireURL('This is text. It is not an url.')).to.be.null;
|
|
332
|
+
expect(requireURL('/also/not/an/url')).to.be.null;
|
|
333
|
+
expect(requireURL('')).to.be.null;
|
|
334
|
+
expect(requireURL('%')).to.be.null;
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
describe('robustness on untrusted data', function () {
|
|
339
|
+
it('should fail if input is not [string] (more parameters are ignored)', function () {
|
|
340
|
+
expect(() => requireURL()).to.throw();
|
|
341
|
+
expect(() => requireURL({ wrong: 'types' }, 42)).to.throw();
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
it('should not fail on well-formed but arbitrary text', function () {
|
|
345
|
+
fc.assert(
|
|
346
|
+
fc.property(fc.fullUnicodeString(), (untrustedText) => {
|
|
347
|
+
const result = requireURL(untrustedText);
|
|
348
|
+
if (result !== null) {
|
|
349
|
+
expect(result).to.eql(untrustedText);
|
|
350
|
+
}
|
|
351
|
+
}),
|
|
352
|
+
);
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
it('should not fail on well-formed but arbitrary URLs', function () {
|
|
356
|
+
fc.assert(
|
|
357
|
+
fc.property(
|
|
358
|
+
fc.webUrl({ withQueryParameters: true, withFragments: true }),
|
|
359
|
+
(untrustedUrl) => {
|
|
360
|
+
expect(requireURL(untrustedUrl)).to.eql(untrustedUrl);
|
|
361
|
+
},
|
|
362
|
+
),
|
|
363
|
+
);
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
describe('#maskU', function () {
|
|
369
|
+
let maskU;
|
|
370
|
+
|
|
371
|
+
beforeEach(function () {
|
|
372
|
+
maskU = lookupBuiltinTransform('maskU');
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
// most of the tests are in the sanitizer, so there is no need to repeat everything here
|
|
376
|
+
describe('core functionality', function () {
|
|
377
|
+
it('["https://example.test/"] -> "https://example.test/"', function () {
|
|
378
|
+
expect(maskU('https://example.test/')).to.eql('https://example.test/');
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
it('should return null for non URLs', function () {
|
|
382
|
+
expect(maskU('some text')).to.be.null;
|
|
383
|
+
expect(maskU('/some/text')).to.be.null;
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
describe('robustness on untrusted data', function () {
|
|
388
|
+
it('should fail if input is not [string] (more parameters are ignored)', function () {
|
|
389
|
+
expect(() => maskU()).to.throw();
|
|
390
|
+
expect(() => maskU({ wrong: 'types' }, 42)).to.throw();
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
it('should not fail on well-formed but arbitrary text', function () {
|
|
394
|
+
fc.assert(
|
|
395
|
+
fc.property(fc.fullUnicodeString(), (untrustedText) => {
|
|
396
|
+
// should not throw
|
|
397
|
+
maskU(untrustedText);
|
|
398
|
+
}),
|
|
399
|
+
);
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
it('should not fail on well-formed but arbitrary URLs', function () {
|
|
403
|
+
fc.assert(
|
|
404
|
+
fc.property(fc.webUrl(), (untrustedUrl) => {
|
|
405
|
+
// should not throw
|
|
406
|
+
maskU(untrustedUrl);
|
|
407
|
+
}),
|
|
408
|
+
);
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
describe('#split', function () {
|
|
414
|
+
let split;
|
|
415
|
+
|
|
416
|
+
beforeEach(function () {
|
|
417
|
+
split = lookupBuiltinTransform('split');
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
describe('core functionality', function () {
|
|
421
|
+
it('["abc_def_ghi", "_", 0] -> "abc"', function () {
|
|
422
|
+
expect(split('abc_def_ghi', '_', 0)).to.eql('abc');
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
it('["abc_def_ghi", "_", 1] -> "def"', function () {
|
|
426
|
+
expect(split('abc_def_ghi', '_', 1)).to.eql('def');
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
it('should return null if there is no match', function () {
|
|
430
|
+
expect(split('some text', '<foo>', 0)).to.be.null;
|
|
431
|
+
expect(split('some text', '<foo>', 1)).to.be.null;
|
|
432
|
+
expect(split('some text', '<foo>', 2)).to.be.null;
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
it('should return null if there is a match but the index is out of bounds', function () {
|
|
436
|
+
expect(split('abc_def_ghi', '_', 100)).to.be.null;
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
it('should allow to remove URL hashes', function () {
|
|
440
|
+
expect(
|
|
441
|
+
split('https://example.test/foo/bar?x=1&y=2#some-hash', '#', 0),
|
|
442
|
+
).to.eql('https://example.test/foo/bar?x=1&y=2');
|
|
443
|
+
expect(split('https://example.test/#', '#', 0)).to.eql(
|
|
444
|
+
'https://example.test/',
|
|
445
|
+
);
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
describe('robustness on untrusted data', function () {
|
|
450
|
+
it('should fail if input is not [string, string, integer] (more parameters are ignored)', function () {
|
|
451
|
+
expect(() => split()).to.throw();
|
|
452
|
+
expect(() => split('too few arguments')).to.throw();
|
|
453
|
+
expect(() => split('too few arguments', 'still too few')).to.throw();
|
|
454
|
+
expect(() => split({ wrong: 'types' }, 42, 'wrong')).to.throw();
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
it('should not fail on well-formed but arbitrary text', function () {
|
|
458
|
+
fc.assert(
|
|
459
|
+
fc.property(
|
|
460
|
+
fc.fullUnicodeString(),
|
|
461
|
+
fc.string(),
|
|
462
|
+
(untrustedText, splitOn) => {
|
|
463
|
+
fc.pre(splitOn.length > 0);
|
|
464
|
+
|
|
465
|
+
// should not throw
|
|
466
|
+
split(untrustedText, splitOn, 0);
|
|
467
|
+
split(untrustedText, splitOn, 1);
|
|
468
|
+
split(untrustedText, splitOn, 2);
|
|
469
|
+
},
|
|
470
|
+
),
|
|
471
|
+
);
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
it('should not fail on well-formed but arbitrary URLs', function () {
|
|
475
|
+
fc.assert(
|
|
476
|
+
fc.property(fc.webUrl(), fc.string(), (untrustedUrl, splitOn) => {
|
|
477
|
+
fc.pre(splitOn.length > 0);
|
|
478
|
+
|
|
479
|
+
// should not throw
|
|
480
|
+
split(untrustedUrl, splitOn, 0);
|
|
481
|
+
split(untrustedUrl, splitOn, 1);
|
|
482
|
+
split(untrustedUrl, splitOn, 2);
|
|
483
|
+
}),
|
|
484
|
+
);
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
describe('#trySplit', function () {
|
|
490
|
+
let trySplit;
|
|
491
|
+
|
|
492
|
+
beforeEach(function () {
|
|
493
|
+
trySplit = lookupBuiltinTransform('trySplit');
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
describe('core functionality', function () {
|
|
497
|
+
it('["abc_def_ghi", "_", 0] -> "abc"', function () {
|
|
498
|
+
expect(trySplit('abc_def_ghi', '_', 0)).to.eql('abc');
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
it('["abc_def_ghi", "_", 1] -> "def"', function () {
|
|
502
|
+
expect(trySplit('abc_def_ghi', '_', 1)).to.eql('def');
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
it('should return the original text if there is no match', function () {
|
|
506
|
+
expect(trySplit('some text', '<foo>', 0)).to.eql('some text');
|
|
507
|
+
expect(trySplit('some text', '<foo>', 1)).to.eql('some text');
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
it('should return the original text if there is a match but the index is out of bounds', function () {
|
|
511
|
+
expect(trySplit('abc_def_ghi', '_', 100)).to.eql('abc_def_ghi');
|
|
512
|
+
});
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
describe('robustness on untrusted data', function () {
|
|
516
|
+
it('should fail if input is not [string, string, integer] (more parameters are ignored)', function () {
|
|
517
|
+
expect(() => trySplit()).to.throw();
|
|
518
|
+
expect(() => trySplit('too few arguments')).to.throw();
|
|
519
|
+
expect(() => trySplit({ wrong: 'types' }, [], 42)).to.throw();
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
it('should not fail on well-formed but arbitrary text', function () {
|
|
523
|
+
fc.assert(
|
|
524
|
+
fc.property(
|
|
525
|
+
fc.fullUnicodeString(),
|
|
526
|
+
fc.string(),
|
|
527
|
+
(untrustedText, trySplitOn) => {
|
|
528
|
+
fc.pre(trySplitOn.length > 0);
|
|
529
|
+
|
|
530
|
+
// should not throw
|
|
531
|
+
trySplit(untrustedText, trySplitOn, 0);
|
|
532
|
+
trySplit(untrustedText, trySplitOn, 1);
|
|
533
|
+
trySplit(untrustedText, trySplitOn, 2);
|
|
534
|
+
},
|
|
535
|
+
),
|
|
536
|
+
);
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
it('should not fail on well-formed but arbitrary URLs', function () {
|
|
540
|
+
fc.assert(
|
|
541
|
+
fc.property(fc.webUrl(), fc.string(), (untrustedUrl, trySplitOn) => {
|
|
542
|
+
fc.pre(trySplitOn.length > 0);
|
|
543
|
+
|
|
544
|
+
// should not throw
|
|
545
|
+
trySplit(untrustedUrl, trySplitOn, 0);
|
|
546
|
+
trySplit(untrustedUrl, trySplitOn, 1);
|
|
547
|
+
trySplit(untrustedUrl, trySplitOn, 2);
|
|
548
|
+
}),
|
|
549
|
+
);
|
|
550
|
+
});
|
|
551
|
+
});
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
describe('#decodeURIComponent', function () {
|
|
555
|
+
let uut;
|
|
556
|
+
|
|
557
|
+
beforeEach(function () {
|
|
558
|
+
uut = lookupBuiltinTransform('decodeURIComponent');
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
describe('core functionality', function () {
|
|
562
|
+
it('should behave like decodeURIComponent for valid URLs', function () {
|
|
563
|
+
fc.assert(
|
|
564
|
+
fc.property(fc.webUrl(), (url) => {
|
|
565
|
+
const input = encodeURIComponent(url);
|
|
566
|
+
expect(uut(input)).to.eql(url);
|
|
567
|
+
}),
|
|
568
|
+
);
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
it('should behave like decodeURIComponent for any properly encodeded string', function () {
|
|
572
|
+
fc.assert(
|
|
573
|
+
fc.property(fc.fullUnicodeString(), (text) => {
|
|
574
|
+
const input = encodeURIComponent(text);
|
|
575
|
+
expect(uut(input)).to.eql(text);
|
|
576
|
+
}),
|
|
577
|
+
);
|
|
578
|
+
});
|
|
579
|
+
|
|
580
|
+
describe('should return null for invalid URIs', function () {
|
|
581
|
+
['%', '%%', '-%-'].forEach((invalidURI) => {
|
|
582
|
+
it(`invalid URI: ${invalidURI}`, function () {
|
|
583
|
+
expect(uut(invalidURI)).to.be.null;
|
|
584
|
+
});
|
|
585
|
+
});
|
|
586
|
+
});
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
describe('robustness on untrusted data', function () {
|
|
590
|
+
it('should fail if input is not [string] (more parameters are ignored)', function () {
|
|
591
|
+
expect(() => uut()).to.throw();
|
|
592
|
+
expect(() => uut({ wrong: 'types' })).to.throw();
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
it('should not fail on well-formed but arbitrary text', function () {
|
|
596
|
+
fc.assert(
|
|
597
|
+
fc.property(fc.fullUnicodeString(), (untrustedText) => {
|
|
598
|
+
const result = uut(untrustedText);
|
|
599
|
+
if (result !== null) {
|
|
600
|
+
expect(result).to.be.a('string');
|
|
601
|
+
}
|
|
602
|
+
}),
|
|
603
|
+
);
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
it('should not fail on well-formed but arbitrary URLs', function () {
|
|
607
|
+
fc.assert(
|
|
608
|
+
fc.property(fc.webUrl(), (untrustedUrl) => {
|
|
609
|
+
const result = uut(untrustedUrl);
|
|
610
|
+
if (result !== null) {
|
|
611
|
+
expect(result).to.be.a('string');
|
|
612
|
+
}
|
|
613
|
+
}),
|
|
614
|
+
);
|
|
615
|
+
});
|
|
616
|
+
});
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
describe('#tryDecodeURIComponent', function () {
|
|
620
|
+
let uut;
|
|
621
|
+
|
|
622
|
+
beforeEach(function () {
|
|
623
|
+
uut = lookupBuiltinTransform('tryDecodeURIComponent');
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
describe('core functionality', function () {
|
|
627
|
+
it('should behave like decodeURIComponent for valid URLs', function () {
|
|
628
|
+
fc.assert(
|
|
629
|
+
fc.property(fc.webUrl(), (url) => {
|
|
630
|
+
const input = encodeURIComponent(url);
|
|
631
|
+
expect(uut(input)).to.eql(url);
|
|
632
|
+
}),
|
|
633
|
+
);
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
it('should behave like decodeURIComponent for any properly encodeded string', function () {
|
|
637
|
+
fc.assert(
|
|
638
|
+
fc.property(fc.fullUnicodeString(), (text) => {
|
|
639
|
+
const input = encodeURIComponent(text);
|
|
640
|
+
expect(uut(input)).to.eql(text);
|
|
641
|
+
}),
|
|
642
|
+
);
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
describe('should return the original text for invalid URIs', function () {
|
|
646
|
+
['%', '%%', '-%-'].forEach((invalidURI) => {
|
|
647
|
+
it(`invalid URI: ${invalidURI}`, function () {
|
|
648
|
+
expect(uut(invalidURI)).to.eql(invalidURI);
|
|
649
|
+
});
|
|
650
|
+
});
|
|
651
|
+
});
|
|
652
|
+
});
|
|
653
|
+
|
|
654
|
+
describe('robustness on untrusted data', function () {
|
|
655
|
+
it('should fail if input is not [string] (more parameters are ignored)', function () {
|
|
656
|
+
expect(() => uut()).to.throw();
|
|
657
|
+
expect(() => uut({ wrong: 'types' })).to.throw();
|
|
658
|
+
});
|
|
659
|
+
|
|
660
|
+
it('should not fail on well-formed but arbitrary text', function () {
|
|
661
|
+
fc.assert(
|
|
662
|
+
fc.property(fc.fullUnicodeString(), (untrustedText) => {
|
|
663
|
+
expect(uut(untrustedText)).to.be.a('string');
|
|
664
|
+
}),
|
|
665
|
+
);
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
it('should not fail on well-formed but arbitrary URLs', function () {
|
|
669
|
+
fc.assert(
|
|
670
|
+
fc.property(fc.webUrl(), (untrustedUrl) => {
|
|
671
|
+
expect(uut(untrustedUrl)).to.be.a('string');
|
|
672
|
+
}),
|
|
673
|
+
);
|
|
674
|
+
});
|
|
675
|
+
});
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
describe('#json', function () {
|
|
679
|
+
let uut;
|
|
680
|
+
|
|
681
|
+
beforeEach(function () {
|
|
682
|
+
uut = lookupBuiltinTransform('json');
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
describe('core functionality', function () {
|
|
686
|
+
it('should extract fields from JSON', function () {
|
|
687
|
+
expect(uut('{"a":1}', 'a')).to.equal('1');
|
|
688
|
+
expect(uut('{"a":1, "b":"2"}', 'b')).to.equal('2');
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
it('should extract nested fields from JSON', function () {
|
|
692
|
+
expect(uut('{ "a": { "nested": true } }', 'a.nested')).to.equal('true');
|
|
693
|
+
expect(uut('{ "a": { "b": { "c": "3" } } }', 'a.b.c')).to.equal('3');
|
|
694
|
+
});
|
|
695
|
+
|
|
696
|
+
it('should reject unexpected normal text', function () {
|
|
697
|
+
expect(uut('Some example text', '')).to.equal('');
|
|
698
|
+
expect(uut('Some example text', 'key')).to.equal('');
|
|
699
|
+
expect(uut('Some example text {"key":"1"}', 'key')).to.equal('');
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
it('should by default not extract non-trivial objects', function () {
|
|
703
|
+
expect(uut('{"a":[1,2,3]}', 'a')).to.equal('');
|
|
704
|
+
expect(uut('{"a":{"b":1}"}', 'a')).to.equal('');
|
|
705
|
+
});
|
|
706
|
+
|
|
707
|
+
it('should extract non-trivial objects when enabled', function () {
|
|
708
|
+
expect(JSON.parse(uut('{"a":[1,2,3]}', 'a', true))).to.deep.equal([
|
|
709
|
+
1, 2, 3,
|
|
710
|
+
]);
|
|
711
|
+
expect(JSON.parse(uut('{"a":[1,2,3]}', 'a', true))).to.deep.equal([
|
|
712
|
+
1, 2, 3,
|
|
713
|
+
]);
|
|
714
|
+
expect(JSON.parse(uut('{"a":{"b":1}}', 'a', true))).to.deep.equal({
|
|
715
|
+
b: 1,
|
|
716
|
+
});
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
it('should ignore incorrect JSON', function () {
|
|
720
|
+
expect(uut('', 'a')).to.equal('');
|
|
721
|
+
expect(uut('][', 'a')).to.equal('');
|
|
722
|
+
expect(uut('a:3', 'a')).to.equal('');
|
|
723
|
+
expect(uut('a:3}', 'a')).to.equal('');
|
|
724
|
+
});
|
|
725
|
+
});
|
|
726
|
+
|
|
727
|
+
describe('robustness on untrusted data', function () {
|
|
728
|
+
it('should fail if input is not [string, string, [bool]]', function () {
|
|
729
|
+
expect(() => uut()).to.throw();
|
|
730
|
+
expect(() => uut('foo')).to.throw();
|
|
731
|
+
expect(() => uut({ wrong: 'types' }, { wrong: 'types' })).to.throw();
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
it('should not fail on well-formed but arbitrary text', function () {
|
|
735
|
+
fc.assert(
|
|
736
|
+
fc.property(
|
|
737
|
+
fc.fullUnicodeString(),
|
|
738
|
+
fc.string(),
|
|
739
|
+
fc.boolean(),
|
|
740
|
+
(untrustedText, path, extractObjects) => {
|
|
741
|
+
expect(uut(untrustedText, path)).to.be.a('string');
|
|
742
|
+
expect(uut(untrustedText, path, extractObjects)).to.be.a(
|
|
743
|
+
'string',
|
|
744
|
+
);
|
|
745
|
+
},
|
|
746
|
+
),
|
|
747
|
+
);
|
|
748
|
+
});
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
});
|