@whotracksme/reporting 5.1.29 → 5.1.31
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/CHANGELOG.md +41 -0
- package/package.json +1 -1
- package/reporting/example/index.js +2 -12
- package/reporting/example/manifests/chromium.json +1 -0
- package/reporting/snapshots/0001/snapshot.json +2933 -2933
- package/reporting/snapshots/0002/snapshot.json +2101 -1901
- package/reporting/snapshots/0003/events.log.br +0 -0
- package/reporting/snapshots/0003/snapshot.json +855 -0
- package/reporting/snapshots/0004/events.log.br +0 -0
- package/reporting/snapshots/0004/snapshot.json +802 -0
- package/reporting/src/hash-detector.js +1 -1
- package/reporting/src/index.js +1 -2
- package/reporting/src/request/config.js +9 -4
- package/reporting/src/request/{hash.js → hash/index.js} +3 -3
- package/reporting/src/request/index.js +427 -496
- package/reporting/src/{webrequest-pipeline → request}/page-store.js +62 -98
- package/reporting/src/request/qs-whitelist2.js +0 -2
- package/reporting/src/request/steps/cookie-context.js +6 -5
- package/reporting/src/request/steps/oauth-detector.js +3 -24
- package/reporting/src/request/steps/page-logger.js +3 -4
- package/reporting/src/request/steps/token-checker/token-domain.js +1 -1
- package/reporting/src/request/steps/token-examiner.js +3 -4
- package/reporting/src/request/steps/token-telemetry/cached-entry-pipeline.js +52 -68
- package/reporting/src/request/steps/token-telemetry/index.js +86 -113
- package/reporting/src/request/steps/token-telemetry/key-pipeline.js +3 -2
- package/reporting/src/request/steps/token-telemetry/token-pipeline.js +3 -2
- package/reporting/src/request/utils/temp-set.js +2 -4
- package/reporting/src/request/{time.js → utils/time.js} +0 -5
- package/reporting/src/request/utils/tlds.js +1 -11
- package/reporting/src/request/{utils.js → utils/utils.js} +9 -0
- package/reporting/src/{webrequest-pipeline/webrequest-context.js → request/utils/webrequest.js} +85 -10
- package/reporting/src/utils/url.js +0 -25
- package/reporting/test/helpers/scenarios.js +17 -2
- package/reporting/test/index.js +3 -8
- package/reporting/test/request/{hash.spec.js → hash/index.spec.js} +2 -2
- package/reporting/test/request/index.spec.js +25 -66
- package/reporting/test/{request-reporter.test.js → request/index.test.js} +13 -17
- package/reporting/test/{webrequest-pipeline → request}/page-store.test.js +1 -1
- package/reporting/test/request/steps/oauth-detector.spec.js +15 -25
- package/reporting/test/request/{utils.spec.js → utils/utils.spec.js} +2 -2
- package/reporting/test/utils/url.spec.js +1 -26
- package/reporting/src/request/page-telemetry.js +0 -42
- package/reporting/src/request/steps/subdomain-check.js +0 -34
- package/reporting/src/request/utils/subject.js +0 -37
- package/reporting/src/request-reporter.js +0 -111
- package/reporting/src/utils/pacemaker.js +0 -279
- package/reporting/src/webrequest-pipeline/cname-uncloak.js +0 -110
- package/reporting/src/webrequest-pipeline/index.js +0 -286
- package/reporting/src/webrequest-pipeline/logger.js +0 -14
- package/reporting/src/webrequest-pipeline/pipeline.js +0 -249
- package/reporting/src/webrequest-pipeline/utils/webrequest.js +0 -119
- package/reporting/test/utils/pacemaker.spec.js +0 -222
- package/reporting/test/webrequest-pipeline/index.test.js +0 -160
- package/reporting/test/webrequest-pipeline/pipeline.spec.js +0 -251
- /package/reporting/src/request/{resources → hash}/prob.js +0 -0
package/reporting/src/index.js
CHANGED
|
@@ -9,6 +9,5 @@
|
|
|
9
9
|
* file, You can obtain one at http://mozilla.org/MPL/2.0
|
|
10
10
|
*/
|
|
11
11
|
export { default as UrlReporter } from './reporting';
|
|
12
|
-
export { default as RequestReporter } from './request
|
|
13
|
-
export { default as WebRequestPipeline } from './webrequest-pipeline';
|
|
12
|
+
export { default as RequestReporter } from './request/index';
|
|
14
13
|
export { setLogLevel, describeLoggers } from './logger';
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* file, You can obtain one at http://mozilla.org/MPL/2.0
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import pacemaker from '../utils/pacemaker.js';
|
|
13
12
|
import logger from '../logger.js';
|
|
14
13
|
|
|
15
14
|
const RETRY_TIMEOUT = 30 * 1000;
|
|
@@ -21,7 +20,7 @@ export const COOKIE_MODE = {
|
|
|
21
20
|
TRACKERS: 'trackers',
|
|
22
21
|
};
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
const DEFAULTS = {
|
|
25
24
|
safekeyValuesThreshold: 4,
|
|
26
25
|
shortTokenLength: 6,
|
|
27
26
|
placeHolder: 'ghostery',
|
|
@@ -80,7 +79,10 @@ export default class Config {
|
|
|
80
79
|
await this._loadConfig();
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
unload() {
|
|
82
|
+
unload() {
|
|
83
|
+
clearTimeout(this._retryTimeout);
|
|
84
|
+
this._retryTimeout = null;
|
|
85
|
+
}
|
|
84
86
|
|
|
85
87
|
async _loadConfig() {
|
|
86
88
|
await this.db.ready;
|
|
@@ -104,7 +106,10 @@ export default class Config {
|
|
|
104
106
|
});
|
|
105
107
|
} catch (e) {
|
|
106
108
|
logger.error('could not load request config', e);
|
|
107
|
-
|
|
109
|
+
this._retryTimeout = setTimeout(
|
|
110
|
+
this._loadConfig.bind(this),
|
|
111
|
+
RETRY_TIMEOUT,
|
|
112
|
+
);
|
|
108
113
|
}
|
|
109
114
|
}
|
|
110
115
|
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
/* eslint no-param-reassign: 'off' */
|
|
13
13
|
|
|
14
|
-
import { isIpv4Address } from '../utils/
|
|
15
|
-
import prob from './
|
|
14
|
+
import { isIpv4Address } from '../utils/utils.js';
|
|
15
|
+
import prob from './prob.js';
|
|
16
16
|
|
|
17
17
|
export class HashProb {
|
|
18
18
|
constructor() {
|
|
@@ -72,7 +72,7 @@ export function isMostlyNumeric(str) {
|
|
|
72
72
|
const BEGIN_DATE = new Date(2010, 1, 1).getTime();
|
|
73
73
|
const END_DATE = Date.now() + 1000 * 60 * 60 * 24 * 365 * 5; // now + 5 YEARS;
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
function isTimestamp(str) {
|
|
76
76
|
const intVal = parseInt(str, 10);
|
|
77
77
|
return !isNaN(intVal) && intVal > BEGIN_DATE && intVal < END_DATE;
|
|
78
78
|
}
|