@prosopo/procaptcha-frictionless 2.21.9 → 2.22.1
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/.turbo/turbo-build$colon$cjs.log +10 -9
- package/.turbo/turbo-build$colon$esm.log +10 -9
- package/.turbo/turbo-build$colon$tsc.log +27 -27
- package/CHANGELOG.md +68 -0
- package/dist/cjs/customDetectBot.cjs +16 -5
- package/dist/cjs/detectorPrefetch.cjs +33 -20
- package/dist/cjs/procaptchaFrictionless.cjs +11 -2
- package/dist/cjs/widgetSlot.cjs +21 -0
- package/dist/esm/customDetectBot.js +16 -6
- package/dist/esm/detectorPrefetch.js +34 -21
- package/dist/esm/procaptchaFrictionless.js +11 -2
- package/dist/esm/widgetSlot.js +20 -0
- package/dist/tsc/customDetectBot.d.ts.map +1 -1
- package/dist/tsc/customDetectBot.js +18 -6
- package/dist/tsc/customDetectBot.js.map +1 -1
- package/dist/tsc/detectorPrefetch.d.ts +2 -2
- package/dist/tsc/detectorPrefetch.d.ts.map +1 -1
- package/dist/tsc/detectorPrefetch.js +20 -14
- package/dist/tsc/detectorPrefetch.js.map +1 -1
- package/dist/tsc/procaptchaFrictionless.d.ts.map +1 -1
- package/dist/tsc/procaptchaFrictionless.js +16 -4
- package/dist/tsc/procaptchaFrictionless.js.map +1 -1
- package/dist/tsc/tests/customDetectBotAssignTimeout.test.js +2 -0
- package/dist/tsc/tests/customDetectBotAssignTimeout.test.js.map +1 -1
- package/dist/tsc/tests/customDetectBotFingerprint.test.d.ts +2 -0
- package/dist/tsc/tests/customDetectBotFingerprint.test.d.ts.map +1 -0
- package/dist/tsc/tests/customDetectBotFingerprint.test.js +120 -0
- package/dist/tsc/tests/customDetectBotFingerprint.test.js.map +1 -0
- package/dist/tsc/tests/customDetectBotLanguage.test.js +2 -0
- package/dist/tsc/tests/customDetectBotLanguage.test.js.map +1 -1
- package/dist/tsc/tests/customDetectBotSimd.test.js +2 -0
- package/dist/tsc/tests/customDetectBotSimd.test.js.map +1 -1
- package/dist/tsc/tests/detectorPrefetch.test.js +35 -2
- package/dist/tsc/tests/detectorPrefetch.test.js.map +1 -1
- package/dist/tsc/tests/procaptchaFrictionless.test.js +77 -0
- package/dist/tsc/tests/procaptchaFrictionless.test.js.map +1 -1
- package/dist/tsc/tests/widgetSlot.test.d.ts +2 -0
- package/dist/tsc/tests/widgetSlot.test.d.ts.map +1 -0
- package/dist/tsc/tests/widgetSlot.test.js +37 -0
- package/dist/tsc/tests/widgetSlot.test.js.map +1 -0
- package/dist/tsc/widgetSlot.d.ts +3 -0
- package/dist/tsc/widgetSlot.d.ts.map +1 -0
- package/dist/tsc/widgetSlot.js +22 -0
- package/dist/tsc/widgetSlot.js.map +1 -0
- package/dist/types/customDetectBot.d.ts.map +1 -1
- package/dist/types/detectorPrefetch.d.ts +2 -2
- package/dist/types/detectorPrefetch.d.ts.map +1 -1
- package/dist/types/procaptchaFrictionless.d.ts.map +1 -1
- package/dist/types/tests/customDetectBotFingerprint.test.d.ts +2 -0
- package/dist/types/tests/customDetectBotFingerprint.test.d.ts.map +1 -0
- package/dist/types/tests/widgetSlot.test.d.ts +2 -0
- package/dist/types/tests/widgetSlot.test.d.ts.map +1 -0
- package/dist/types/widgetSlot.d.ts +3 -0
- package/dist/types/widgetSlot.d.ts.map +1 -0
- package/package.json +15 -14
|
@@ -8,13 +8,13 @@ ViteCommonJSConfig: .
|
|
|
8
8
|
'/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
|
|
9
9
|
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
|
|
10
10
|
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
11
|
+
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
12
|
+
'/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
|
|
11
13
|
'/home/runner/work/captcha/captcha/packages/procaptcha-audio/tsconfig.json',
|
|
12
14
|
'/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
|
|
13
15
|
'/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
|
|
14
16
|
'/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
|
|
15
17
|
'/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
|
|
16
|
-
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
17
|
-
'/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
|
|
18
18
|
'/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
|
|
19
19
|
'/home/runner/work/captcha/captcha/packages/procaptcha-icon-order/tsconfig.json',
|
|
20
20
|
'/home/runner/work/captcha/captcha/packages/procaptcha-pow/tsconfig.json',
|
|
@@ -33,13 +33,13 @@ ViteCommonJSConfig: .
|
|
|
33
33
|
'@prosopo/util',
|
|
34
34
|
'@prosopo/util-crypto',
|
|
35
35
|
'@prosopo/common',
|
|
36
|
+
'@prosopo/fingerprint',
|
|
37
|
+
'@prosopo/fingerprintjs',
|
|
36
38
|
'@prosopo/procaptcha-audio',
|
|
37
39
|
'@prosopo/procaptcha-common',
|
|
38
40
|
'@prosopo/load-balancer',
|
|
39
41
|
'@prosopo/widget-skeleton',
|
|
40
42
|
'@prosopo/account',
|
|
41
|
-
'@prosopo/fingerprint',
|
|
42
|
-
'@prosopo/fingerprintjs',
|
|
43
43
|
'@prosopo/keyring',
|
|
44
44
|
'@prosopo/procaptcha-icon-order',
|
|
45
45
|
'@prosopo/procaptcha-pow',
|
|
@@ -54,16 +54,17 @@ ViteCommonJSConfig: .
|
|
|
54
54
|
[36mvite v8.1.6 [32mbuilding ssr environment for production...[36m[39m
|
|
55
55
|
Bundle build started
|
|
56
56
|
[2K
|
|
57
|
-
✓
|
|
57
|
+
✓ 10 modules transformed.
|
|
58
58
|
rendering chunks...
|
|
59
59
|
computing gzip size...
|
|
60
60
|
dist/cjs/index.cjs 0.55 kB │ gzip: 0.21 kB
|
|
61
|
+
dist/cjs/widgetSlot.cjs 0.74 kB │ gzip: 0.33 kB
|
|
61
62
|
dist/cjs/detectorLoader.cjs 1.65 kB │ gzip: 0.90 kB
|
|
62
63
|
dist/cjs/sessionInvalidatedRecovery.cjs 2.50 kB │ gzip: 1.14 kB
|
|
63
64
|
dist/cjs/frictionlessResultGuard.cjs 2.78 kB │ gzip: 1.42 kB
|
|
64
|
-
dist/cjs/detectorPrefetch.cjs 3.
|
|
65
|
+
dist/cjs/detectorPrefetch.cjs 3.59 kB │ gzip: 1.57 kB
|
|
65
66
|
dist/cjs/authenticatedBadge.cjs 3.81 kB │ gzip: 1.45 kB
|
|
66
|
-
dist/cjs/customDetectBot.cjs 6.
|
|
67
|
-
dist/cjs/procaptchaFrictionless.cjs
|
|
67
|
+
dist/cjs/customDetectBot.cjs 6.95 kB │ gzip: 2.04 kB
|
|
68
|
+
dist/cjs/procaptchaFrictionless.cjs 14.20 kB │ gzip: 3.90 kB
|
|
68
69
|
|
|
69
|
-
[32m✓ built in
|
|
70
|
+
[32m✓ built in 31ms[39m
|
|
@@ -8,13 +8,13 @@ ViteEsmConfig: .
|
|
|
8
8
|
'/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
|
|
9
9
|
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
|
|
10
10
|
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
11
|
+
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
12
|
+
'/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
|
|
11
13
|
'/home/runner/work/captcha/captcha/packages/procaptcha-audio/tsconfig.json',
|
|
12
14
|
'/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
|
|
13
15
|
'/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
|
|
14
16
|
'/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
|
|
15
17
|
'/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
|
|
16
|
-
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
17
|
-
'/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
|
|
18
18
|
'/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
|
|
19
19
|
'/home/runner/work/captcha/captcha/packages/procaptcha-icon-order/tsconfig.json',
|
|
20
20
|
'/home/runner/work/captcha/captcha/packages/procaptcha-pow/tsconfig.json',
|
|
@@ -33,13 +33,13 @@ ViteEsmConfig: .
|
|
|
33
33
|
'@prosopo/util',
|
|
34
34
|
'@prosopo/util-crypto',
|
|
35
35
|
'@prosopo/common',
|
|
36
|
+
'@prosopo/fingerprint',
|
|
37
|
+
'@prosopo/fingerprintjs',
|
|
36
38
|
'@prosopo/procaptcha-audio',
|
|
37
39
|
'@prosopo/procaptcha-common',
|
|
38
40
|
'@prosopo/load-balancer',
|
|
39
41
|
'@prosopo/widget-skeleton',
|
|
40
42
|
'@prosopo/account',
|
|
41
|
-
'@prosopo/fingerprint',
|
|
42
|
-
'@prosopo/fingerprintjs',
|
|
43
43
|
'@prosopo/keyring',
|
|
44
44
|
'@prosopo/procaptcha-icon-order',
|
|
45
45
|
'@prosopo/procaptcha-pow',
|
|
@@ -54,17 +54,18 @@ ViteEsmConfig: .
|
|
|
54
54
|
[36mvite v8.1.6 [32mbuilding ssr environment for production...[36m[39m
|
|
55
55
|
Bundle build started
|
|
56
56
|
[2K
|
|
57
|
-
✓
|
|
57
|
+
✓ 10 modules transformed.
|
|
58
58
|
rendering chunks...
|
|
59
59
|
computing gzip size...
|
|
60
60
|
dist/esm/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
|
|
61
61
|
dist/esm/index.js 0.33 kB │ gzip: 0.15 kB
|
|
62
|
+
dist/esm/widgetSlot.js 0.66 kB │ gzip: 0.32 kB
|
|
62
63
|
dist/esm/detectorLoader.js 1.63 kB │ gzip: 0.90 kB
|
|
63
64
|
dist/esm/sessionInvalidatedRecovery.js 2.41 kB │ gzip: 1.13 kB
|
|
64
65
|
dist/esm/frictionlessResultGuard.js 2.71 kB │ gzip: 1.41 kB
|
|
65
|
-
dist/esm/detectorPrefetch.js 2.98 kB │ gzip: 1.37 kB
|
|
66
66
|
dist/esm/authenticatedBadge.js 3.30 kB │ gzip: 1.42 kB
|
|
67
|
-
dist/esm/
|
|
68
|
-
dist/esm/
|
|
67
|
+
dist/esm/detectorPrefetch.js 3.46 kB │ gzip: 1.54 kB
|
|
68
|
+
dist/esm/customDetectBot.js 6.71 kB │ gzip: 2.02 kB
|
|
69
|
+
dist/esm/procaptchaFrictionless.js 13.49 kB │ gzip: 3.87 kB
|
|
69
70
|
|
|
70
|
-
[32m✓ built in
|
|
71
|
+
[32m✓ built in 30ms[39m
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$ tsc --build --verbose
|
|
2
|
-
11:
|
|
2
|
+
11:34:04 PM - Projects in this build:
|
|
3
3
|
* ../../dev/config/tsconfig.json
|
|
4
4
|
* ../util/tsconfig.json
|
|
5
5
|
* ../locale/tsconfig.json
|
|
@@ -7,10 +7,10 @@ $ tsc --build --verbose
|
|
|
7
7
|
* ../types/tsconfig.json
|
|
8
8
|
* ../api/tsconfig.json
|
|
9
9
|
* ../common/tsconfig.json
|
|
10
|
-
* ../load-balancer/tsconfig.json
|
|
11
|
-
* ../widget-skeleton/tsconfig.json
|
|
12
10
|
* ../fingerprintjs/tsconfig.json
|
|
13
11
|
* ../fingerprint/tsconfig.json
|
|
12
|
+
* ../load-balancer/tsconfig.json
|
|
13
|
+
* ../widget-skeleton/tsconfig.json
|
|
14
14
|
* ../keyring/tsconfig.json
|
|
15
15
|
* ../account/tsconfig.json
|
|
16
16
|
* ../procaptcha-common/tsconfig.json
|
|
@@ -24,51 +24,51 @@ $ tsc --build --verbose
|
|
|
24
24
|
* ../procaptcha-react/tsconfig.json
|
|
25
25
|
* tsconfig.json
|
|
26
26
|
|
|
27
|
-
11:
|
|
27
|
+
11:34:04 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/dist/tsc/tsconfig.tsbuildinfo'
|
|
28
28
|
|
|
29
|
-
11:
|
|
29
|
+
11:34:04 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/dist/tsc/tsconfig.tsbuildinfo'
|
|
30
30
|
|
|
31
|
-
11:
|
|
31
|
+
11:34:04 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/dist/tsc/tsconfig.tsbuildinfo'
|
|
32
32
|
|
|
33
|
-
11:
|
|
33
|
+
11:34:04 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/dist/tsc/tsconfig.tsbuildinfo'
|
|
34
34
|
|
|
35
|
-
11:
|
|
35
|
+
11:34:04 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/dist/tsc/tsconfig.tsbuildinfo'
|
|
36
36
|
|
|
37
|
-
11:
|
|
37
|
+
11:34:04 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/dist/tsc/tsconfig.tsbuildinfo'
|
|
38
38
|
|
|
39
|
-
11:
|
|
39
|
+
11:34:04 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/errorCodes.ts' is older than output '../common/dist/tsc/tsconfig.tsbuildinfo'
|
|
40
40
|
|
|
41
|
-
11:
|
|
41
|
+
11:34:04 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/dist/tsc/tsconfig.tsbuildinfo'
|
|
42
42
|
|
|
43
|
-
11:
|
|
43
|
+
11:34:04 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.test.ts' is older than output '../fingerprint/dist/tsc/tsconfig.tsbuildinfo'
|
|
44
44
|
|
|
45
|
-
11:
|
|
45
|
+
11:34:04 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/developmentProviderUrl.ts' is older than output '../load-balancer/dist/tsc/tsconfig.tsbuildinfo'
|
|
46
46
|
|
|
47
|
-
11:
|
|
47
|
+
11:34:04 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/webComponent/createWidget.ts' is older than output '../widget-skeleton/dist/tsc/tsconfig.tsbuildinfo'
|
|
48
48
|
|
|
49
|
-
11:
|
|
49
|
+
11:34:04 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/errorSites.ts' is older than output '../keyring/dist/tsc/tsconfig.tsbuildinfo'
|
|
50
50
|
|
|
51
|
-
11:
|
|
51
|
+
11:34:04 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/dist/tsc/tsconfig.tsbuildinfo'
|
|
52
52
|
|
|
53
|
-
11:
|
|
53
|
+
11:34:04 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/extensionLoader.ts' is older than output '../procaptcha-common/dist/tsc/tsconfig.tsbuildinfo'
|
|
54
54
|
|
|
55
|
-
11:
|
|
55
|
+
11:34:05 PM - Project '../procaptcha-audio/tsconfig.json' is up to date because newest input '../procaptcha-audio/src/errorSites.ts' is older than output '../procaptcha-audio/dist/tsc/tsconfig.tsbuildinfo'
|
|
56
56
|
|
|
57
|
-
11:
|
|
57
|
+
11:34:05 PM - Project '../procaptcha-icon-order/tsconfig.json' is up to date because newest input '../procaptcha-icon-order/src/errorSites.ts' is older than output '../procaptcha-icon-order/dist/tsc/tsconfig.tsbuildinfo'
|
|
58
58
|
|
|
59
|
-
11:
|
|
59
|
+
11:34:05 PM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/services/multiThreadedSolver.ts' is older than output '../procaptcha-pow/dist/tsc/tsconfig.tsbuildinfo'
|
|
60
60
|
|
|
61
|
-
11:
|
|
61
|
+
11:34:05 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/errorSites.ts' is older than output '../procaptcha-puzzle/dist/tsc/tsconfig.tsbuildinfo'
|
|
62
62
|
|
|
63
|
-
11:
|
|
63
|
+
11:34:05 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/dist/tsc/tsconfig.tsbuildinfo'
|
|
64
64
|
|
|
65
|
-
11:
|
|
65
|
+
11:34:05 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/errorSites.ts' is older than output '../datasets/dist/tsc/tsconfig.tsbuildinfo'
|
|
66
66
|
|
|
67
|
-
11:
|
|
67
|
+
11:34:05 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/dist/tsc/tsconfig.tsbuildinfo'
|
|
68
68
|
|
|
69
|
-
11:
|
|
69
|
+
11:34:05 PM - Project '../procaptcha-react/tsconfig.json' is up to date because newest input '../procaptcha-react/src/errorSites.ts' is older than output '../procaptcha-react/dist/tsc/tsconfig.tsbuildinfo'
|
|
70
70
|
|
|
71
|
-
11:
|
|
71
|
+
11:34:05 PM - Project 'tsconfig.json' is out of date because output file 'dist/tsc/tsconfig.tsbuildinfo' does not exist
|
|
72
72
|
|
|
73
|
-
11:
|
|
73
|
+
11:34:05 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
|
|
74
74
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# @prosopo/procaptcha-frictionless
|
|
2
2
|
|
|
3
|
+
## 2.22.1
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- f019ec4: The widget now tells the provider which platform embedded it, in an `x-prosopo-integration` header. It reports `mc4wp` for Mailchimp for WordPress and `procaptcha-wordpress` for the Procaptcha WordPress plugin, recognised from the markup each one renders the widget into, so existing installs report without an update. Other sites can name themselves with the `integration` render option or a `data-integration` attribute.
|
|
7
|
+
- Updated dependencies [6fa6155]
|
|
8
|
+
- Updated dependencies [f019ec4]
|
|
9
|
+
- @prosopo/procaptcha-common@2.21.11
|
|
10
|
+
- @prosopo/types@5.20.1
|
|
11
|
+
- @prosopo/procaptcha-pow@2.14.1
|
|
12
|
+
- @prosopo/procaptcha-puzzle@2.17.11
|
|
13
|
+
- @prosopo/procaptcha-audio@0.2.12
|
|
14
|
+
- @prosopo/procaptcha-icon-order@0.2.12
|
|
15
|
+
- @prosopo/procaptcha-react@2.14.12
|
|
16
|
+
- @prosopo/api@4.8.1
|
|
17
|
+
- @prosopo/common@3.3.2
|
|
18
|
+
- @prosopo/fingerprint@2.8.5
|
|
19
|
+
|
|
20
|
+
## 2.22.0
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 78107d9: Record the fingerprint summary, and with it the device bucket, for every captcha type rather than only PoW.
|
|
24
|
+
|
|
25
|
+
The proof of fingerprint was only built by the PoW widget and only read when a PoW solution was submitted, so sessions served a puzzle or an image never had a bucket. About half of puzzle drags could only be given one by finding a PoW the same account had solved.
|
|
26
|
+
|
|
27
|
+
The widget now sends the proof with the frictionless request, best-effort and capped at a second so it never delays the captcha. The provider verifies and summarises it once, stores the summary on the session, and the PoW, puzzle and image records copy it from there. Escalation sessions inherit it. A proof sent with a PoW solution still replaces the one from the frictionless request.
|
|
28
|
+
|
|
29
|
+
The summary is only recorded at the frictionless step, not passed to the routing machine there, so existing `deviceBucket` counter rules keep firing where they did before.
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- 1966fc1: Bump the npm-minor-and-patch group across 1 directory with 15 updates
|
|
34
|
+
- d6cc6fe: Pages with more than one widget no longer make every widget after the first fail with `No session found`. The provider hands the same live session to every /frictionless call from one user, IP and site key, and the first challenge used it up, so each later widget got a 400 and had to fetch a new session; clicking several at once could run a widget out of retries and reset it. Each widget now sends a slot number (0, 1, 2, … in page order, capped at 15) and the provider keeps one session per slot. The first widget keeps the old dedup key, so single-widget pages are unchanged, and a reload still reuses each widget's own session.
|
|
35
|
+
- b2ee10d: Removing or resetting a frictionless widget while its bot-detection request is still running no longer lets that request finish the job. Before, a detection that came back after the widget was gone could still mount the Web Bot Auth badge and call `onHuman` with a token, call `onError`, keep retrying against other providers, or schedule a restart timer that nothing could cancel and that later called `onReset`. The widget now stops as soon as it is destroyed.
|
|
36
|
+
- 0e4bc70: Let every widget on a page share one detector-bundle assignment instead of only the first.
|
|
37
|
+
|
|
38
|
+
`takePrefetchedDetector` removed the in-flight entry on claim, so on a page carrying several widgets the first claimed the prefetch and every other widget issued its own provider resolve plus `assignDetectorBundle`. One production integration mounts a widget per form — eight on a property page — so a single page view cost eight assign calls rather than one, enough on its own to push ordinary visitors past a per-IP rate detector.
|
|
39
|
+
|
|
40
|
+
Sharing is sound: `detectorSessionId` binds to a `bundleId` in Redis purely so the provider can resolve which cipher keys decrypt that widget's SIMD readings. Widgets sharing an assignment run the same bundle, so those are the right keys — it is a lookup, not a one-shot token.
|
|
41
|
+
|
|
42
|
+
The guarantee the removal existed for is kept by two narrower mechanisms: a prefetch that rejects drops itself from the map, so no later widget inherits a failed pin, and entries go stale after 60s, so a widget rendered much later starts a fresh prefetch rather than reusing an aged provider pin. Retries were never affected either way — `customDetectBot` only claims on a first attempt.
|
|
43
|
+
- 76b6edd: The widget now tells the provider which bundle it is and where it was loaded from, on every request:
|
|
44
|
+
|
|
45
|
+
- `X-Prosopo-Bundle-Version`: the release the bundle was built from, or `dev` for a local build.
|
|
46
|
+
- `X-Prosopo-Bundle-Origin`: the origin the widget's code came from. `https://js.prosopo.io` is the hosted bundle. Anything else is a site serving its own copy, or building our npm packages into its app.
|
|
47
|
+
|
|
48
|
+
Providers store request headers on the session and in the request logs, so together with the site key these show which sites self-host and which version each one runs.
|
|
49
|
+
|
|
50
|
+
The provider now allows both headers in CORS. Every provider must run this version before the new bundle is published to the CDN: a widget sending these headers to an older provider fails the browser's preflight check and cannot load a captcha.
|
|
51
|
+
- Updated dependencies [1966fc1]
|
|
52
|
+
- Updated dependencies [c69b636]
|
|
53
|
+
- Updated dependencies [78107d9]
|
|
54
|
+
- Updated dependencies [d6cc6fe]
|
|
55
|
+
- Updated dependencies [f13677e]
|
|
56
|
+
- Updated dependencies [77bd891]
|
|
57
|
+
- Updated dependencies [76b6edd]
|
|
58
|
+
- @prosopo/common@3.3.2
|
|
59
|
+
- @prosopo/fingerprint@2.8.4
|
|
60
|
+
- @prosopo/locale@3.13.2
|
|
61
|
+
- @prosopo/procaptcha-common@2.21.10
|
|
62
|
+
- @prosopo/types@5.20.0
|
|
63
|
+
- @prosopo/widget-skeleton@2.10.5
|
|
64
|
+
- @prosopo/api@4.8.0
|
|
65
|
+
- @prosopo/procaptcha-pow@2.14.0
|
|
66
|
+
- @prosopo/procaptcha-puzzle@2.17.10
|
|
67
|
+
- @prosopo/procaptcha-audio@0.2.11
|
|
68
|
+
- @prosopo/procaptcha-icon-order@0.2.11
|
|
69
|
+
- @prosopo/procaptcha-react@2.14.11
|
|
70
|
+
|
|
3
71
|
## 2.21.9
|
|
4
72
|
### Patch Changes
|
|
5
73
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_detectorLoader = require("./detectorLoader.cjs");
|
|
2
2
|
const require_detectorPrefetch = require("./detectorPrefetch.cjs");
|
|
3
3
|
let _prosopo_common = require("@prosopo/common");
|
|
4
|
-
let _prosopo_locale = require("@prosopo/locale");
|
|
5
4
|
let _prosopo_procaptcha_common = require("@prosopo/procaptcha-common");
|
|
6
5
|
let _prosopo_api = require("@prosopo/api");
|
|
6
|
+
let _prosopo_fingerprint = require("@prosopo/fingerprint");
|
|
7
7
|
//#region src/customDetectBot.ts
|
|
8
8
|
var ASSIGN_TIMEOUT_MS = 1e4;
|
|
9
9
|
var sanitiseHref = (href) => {
|
|
@@ -69,7 +69,16 @@ var withTimeout = async (promise, ms) => {
|
|
|
69
69
|
throw error;
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
var
|
|
72
|
+
var FINGERPRINT_PROOF_TIMEOUT_MS = 1e3;
|
|
73
|
+
var fingerprintProofIfReady = async () => {
|
|
74
|
+
try {
|
|
75
|
+
const proof = await withTimeout((0, _prosopo_fingerprint.getFingerprintProof)(_prosopo_fingerprint.FINGERPRINT_DISCLOSURE_KEYS), FINGERPRINT_PROOF_TIMEOUT_MS);
|
|
76
|
+
return (0, _prosopo_fingerprint.encodeFingerprintProof)(proof);
|
|
77
|
+
} catch {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
var customDetectBot = async (config, container, restartFn, retryContext, refreshOf, switchToImage, widgetSlot) => {
|
|
73
82
|
if (!config.account.address) throw new _prosopo_common.ProsopoError({
|
|
74
83
|
code: "SITE_KEY_MISSING",
|
|
75
84
|
errorSite: "FRIC-2"
|
|
@@ -84,7 +93,7 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
|
|
|
84
93
|
prefetchedResult = void 0;
|
|
85
94
|
}
|
|
86
95
|
const provider = prefetchedResult?.provider ?? await (0, _prosopo_procaptcha_common.getProcaptchaRandomActiveProvider)(config.defaultEnvironment, ipMode, retryContext);
|
|
87
|
-
const providerApi = new _prosopo_api.ProviderApi(provider.provider.url, config.account.address, void 0, (0,
|
|
96
|
+
const providerApi = new _prosopo_api.ProviderApi(provider.provider.url, config.account.address, void 0, (0, _prosopo_procaptcha_common.widgetRequestHeaders)(config.language, config.integration));
|
|
88
97
|
let detectorSessionId;
|
|
89
98
|
let providerDetect;
|
|
90
99
|
let detectorOptions;
|
|
@@ -106,7 +115,8 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
|
|
|
106
115
|
if (providerDetect === void 0) {
|
|
107
116
|
const userAccount = await ext.getAccount(config);
|
|
108
117
|
const { currentUrl: fallbackUrl, iframeUrl: fallbackIframeUrl } = getCurrentPageUrls();
|
|
109
|
-
const
|
|
118
|
+
const fallbackFingerprintProof = await fingerprintProofIfReady();
|
|
119
|
+
const captcha = await withTimeout(providerApi.getFrictionlessCaptcha(void 0, void 0, config.account.address, userAccount.account.address, config.mode, void 0, void 0, fallbackUrl, fallbackIframeUrl, clientSessionId, refreshOf, switchToImage, fallbackFingerprintProof, widgetSlot), 1e4);
|
|
110
120
|
if (captcha.dns_url) try {
|
|
111
121
|
fetch(captcha.dns_url, {
|
|
112
122
|
method: "GET",
|
|
@@ -131,7 +141,8 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
|
|
|
131
141
|
const detectionResult = await providerDetect(container, restartFn, () => ext.getAccount(config), detectorOptions);
|
|
132
142
|
const userAccount = detectionResult.userAccount;
|
|
133
143
|
const { currentUrl, iframeUrl } = getCurrentPageUrls();
|
|
134
|
-
const
|
|
144
|
+
const fingerprintProof = await fingerprintProofIfReady();
|
|
145
|
+
const captchaPromise = providerApi.getFrictionlessCaptcha(detectionResult.token, detectionResult.encryptHeadHash, config.account.address, userAccount.account.address, config.mode, void 0, detectorSessionId, currentUrl, iframeUrl, clientSessionId, refreshOf, switchToImage, fingerprintProof, widgetSlot);
|
|
135
146
|
if (detectionResult.getSimdReadings) detectionResult.getSimdReadings(6e4).catch(() => void 0);
|
|
136
147
|
const captcha = await withTimeout(captchaPromise, 1e4);
|
|
137
148
|
if (captcha.dns_url) try {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
let _prosopo_locale = require("@prosopo/locale");
|
|
2
1
|
let _prosopo_procaptcha_common = require("@prosopo/procaptcha-common");
|
|
3
2
|
let _prosopo_api = require("@prosopo/api");
|
|
4
3
|
//#region src/detectorPrefetch.ts
|
|
@@ -15,16 +14,29 @@ let _prosopo_api = require("@prosopo/api");
|
|
|
15
14
|
* Nothing in the request depends on the widget, i18n or its config: it needs
|
|
16
15
|
* the site key (a DOM attribute, readable immediately), the environment (a
|
|
17
16
|
* build-time constant), the IP-mode flags and the site's language (DOM
|
|
18
|
-
* attributes). So the entry
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* attributes). So the entry point kicks it off as soon as it has read those,
|
|
18
|
+
* and `customDetectBot` picks up the in-flight promise instead of starting its
|
|
19
|
+
* own.
|
|
21
20
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* Every widget on the page for the same key claims the same assignment, so a
|
|
22
|
+
* page with one widget per form costs one assign rather than one per widget.
|
|
23
|
+
* That is safe because `detectorSessionId` only tells the provider which
|
|
24
|
+
* bundle's keys decrypt the readings, and every claimant runs that bundle. A
|
|
25
|
+
* retry never claims (see `customDetectBot`), a failed prefetch drops itself,
|
|
26
|
+
* and an entry older than PREFETCH_TTL_MS is replaced, so no claimant inherits
|
|
27
|
+
* a failed or aged provider pin.
|
|
25
28
|
*/
|
|
26
29
|
var inFlight = /* @__PURE__ */ new Map();
|
|
30
|
+
var PREFETCH_TTL_MS = 6e4;
|
|
27
31
|
var keyOf = (environment, ipMode, siteKey) => `${environment}|${ipMode ?? "auto"}|${siteKey}`;
|
|
32
|
+
var freshEntry = (key) => {
|
|
33
|
+
const entry = inFlight.get(key);
|
|
34
|
+
if (entry && Date.now() - entry.startedAt > PREFETCH_TTL_MS) {
|
|
35
|
+
inFlight.delete(key);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
return entry;
|
|
39
|
+
};
|
|
28
40
|
/**
|
|
29
41
|
* Start resolving a provider and assigning a detector bundle. Safe to call more
|
|
30
42
|
* than once for the same key — subsequent calls join the in-flight request.
|
|
@@ -34,29 +46,30 @@ var keyOf = (environment, ipMode, siteKey) => `${environment}|${ipMode ?? "auto"
|
|
|
34
46
|
* by falling back to PoW. Returning a rejected promise here would surface as an
|
|
35
47
|
* unhandled rejection in the host page.
|
|
36
48
|
*/
|
|
37
|
-
var prefetchDetector = (environment, ipMode, siteKey, language) => {
|
|
49
|
+
var prefetchDetector = (environment, ipMode, siteKey, language, integration) => {
|
|
38
50
|
const key = keyOf(environment, ipMode, siteKey);
|
|
39
|
-
if (
|
|
51
|
+
if (freshEntry(key)) return;
|
|
52
|
+
const startedAt = Date.now();
|
|
40
53
|
const promise = (async () => {
|
|
41
54
|
const provider = await (0, _prosopo_procaptcha_common.getProcaptchaRandomActiveProvider)(environment, ipMode);
|
|
42
55
|
return {
|
|
43
56
|
provider,
|
|
44
|
-
assigned: await new _prosopo_api.ProviderApi(provider.provider.url, siteKey, void 0, (0,
|
|
57
|
+
assigned: await new _prosopo_api.ProviderApi(provider.provider.url, siteKey, void 0, (0, _prosopo_procaptcha_common.widgetRequestHeaders)(language, integration)).assignDetectorBundle(siteKey)
|
|
45
58
|
};
|
|
46
59
|
})();
|
|
47
|
-
promise.catch(() =>
|
|
48
|
-
|
|
60
|
+
promise.catch(() => {
|
|
61
|
+
if (inFlight.get(key)?.promise === promise) inFlight.delete(key);
|
|
62
|
+
});
|
|
63
|
+
inFlight.set(key, {
|
|
64
|
+
promise,
|
|
65
|
+
startedAt
|
|
66
|
+
});
|
|
49
67
|
};
|
|
50
68
|
/**
|
|
51
|
-
* Claim
|
|
52
|
-
* entry
|
|
69
|
+
* Claim the prefetched assignment for this exact key, if one is still fresh.
|
|
70
|
+
* The entry stays in place so every widget on the page shares it.
|
|
53
71
|
*/
|
|
54
|
-
var takePrefetchedDetector = (environment, ipMode, siteKey) =>
|
|
55
|
-
const key = keyOf(environment, ipMode, siteKey);
|
|
56
|
-
const promise = inFlight.get(key);
|
|
57
|
-
if (promise) inFlight.delete(key);
|
|
58
|
-
return promise;
|
|
59
|
-
};
|
|
72
|
+
var takePrefetchedDetector = (environment, ipMode, siteKey) => freshEntry(keyOf(environment, ipMode, siteKey))?.promise;
|
|
60
73
|
/** Test seam — drops any in-flight prefetches. */
|
|
61
74
|
var clearPrefetchedDetectors = () => {
|
|
62
75
|
inFlight.clear();
|
|
@@ -2,6 +2,7 @@ const require_authenticatedBadge = require("./authenticatedBadge.cjs");
|
|
|
2
2
|
const require_customDetectBot = require("./customDetectBot.cjs");
|
|
3
3
|
const require_frictionlessResultGuard = require("./frictionlessResultGuard.cjs");
|
|
4
4
|
const require_sessionInvalidatedRecovery = require("./sessionInvalidatedRecovery.cjs");
|
|
5
|
+
const require_widgetSlot = require("./widgetSlot.cjs");
|
|
5
6
|
let _prosopo_common = require("@prosopo/common");
|
|
6
7
|
let _prosopo_locale = require("@prosopo/locale");
|
|
7
8
|
let _prosopo_procaptcha_common = require("@prosopo/procaptcha-common");
|
|
@@ -47,7 +48,10 @@ var mountProcaptchaFrictionless = (container, props) => {
|
|
|
47
48
|
const manualStart = _prosopo_types.StartModeEnum.manual === config.startMode;
|
|
48
49
|
let manualStarted = false;
|
|
49
50
|
let pendingExecute = false;
|
|
50
|
-
const
|
|
51
|
+
const siteKey = config.account?.address ?? "";
|
|
52
|
+
const banner = (0, _prosopo_procaptcha_common.mountTestModeBanner)(container, { siteKey });
|
|
53
|
+
const widgetSlot = require_widgetSlot.claimWidgetSlot(siteKey);
|
|
54
|
+
teardown.add(() => require_widgetSlot.releaseWidgetSlot(siteKey, widgetSlot));
|
|
51
55
|
const slot = (0, _prosopo_procaptcha_common.createElement)("div");
|
|
52
56
|
container.appendChild(slot);
|
|
53
57
|
let solver;
|
|
@@ -92,6 +96,7 @@ var mountProcaptchaFrictionless = (container, props) => {
|
|
|
92
96
|
};
|
|
93
97
|
let restartCount = 0;
|
|
94
98
|
const restartComponentTimeout = () => {
|
|
99
|
+
if (destroyed) return;
|
|
95
100
|
const delay = (0, _prosopo_procaptcha_common.getRestartDelayMs)(restartCount);
|
|
96
101
|
restartCount += 1;
|
|
97
102
|
const timer = setTimeout(() => {
|
|
@@ -116,6 +121,7 @@ var mountProcaptchaFrictionless = (container, props) => {
|
|
|
116
121
|
(widgetContainer ?? document).dispatchEvent(new CustomEvent(PROCAPTCHA_EXECUTE_EVENT));
|
|
117
122
|
};
|
|
118
123
|
const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false, escalationCoords) => {
|
|
124
|
+
if (destroyed) return;
|
|
119
125
|
audioChosen = audioChosen && offersAudioAlternative(captchaType);
|
|
120
126
|
const onEscalate = (next, newSessionId, coords) => {
|
|
121
127
|
if (escalatedSessionIds.has(newSessionId)) return;
|
|
@@ -232,6 +238,7 @@ var mountProcaptchaFrictionless = (container, props) => {
|
|
|
232
238
|
replayPendingExecute();
|
|
233
239
|
};
|
|
234
240
|
const start = async () => {
|
|
241
|
+
if (destroyed) return;
|
|
235
242
|
if (!(0, _prosopo_procaptcha_common.isSecureBrowserContext)()) {
|
|
236
243
|
const error = frontendError(new _prosopo_common.ProsopoError({
|
|
237
244
|
code: "INSECURE_CONTEXT",
|
|
@@ -244,7 +251,8 @@ var mountProcaptchaFrictionless = (container, props) => {
|
|
|
244
251
|
await (0, _prosopo_procaptcha_common.providerRetry)(async () => {
|
|
245
252
|
state.attemptCount += 1;
|
|
246
253
|
const configOutput = _prosopo_types.ProcaptchaConfigSchema.parse(config);
|
|
247
|
-
const result = await detectBot(configOutput, widgetContainer, restart, { attempt: state.attemptCount }, nextRefreshOf, nextSwitchToImage);
|
|
254
|
+
const result = await detectBot(configOutput, widgetContainer, restart, { attempt: state.attemptCount }, nextRefreshOf, nextSwitchToImage, widgetSlot);
|
|
255
|
+
if (destroyed) return;
|
|
248
256
|
const guard = require_frictionlessResultGuard.evaluateFrictionlessResult(result);
|
|
249
257
|
if ("error" === guard.kind) {
|
|
250
258
|
if (guard.retryable) throw new Error(guard.message);
|
|
@@ -281,6 +289,7 @@ var mountProcaptchaFrictionless = (container, props) => {
|
|
|
281
289
|
loading: false
|
|
282
290
|
};
|
|
283
291
|
}, start, resetState, state.attemptCount, 5).finally(() => {
|
|
292
|
+
if (destroyed) return;
|
|
284
293
|
if (state.attemptCount >= 5) {
|
|
285
294
|
events.onError(/* @__PURE__ */ new Error("Cannot load CAPTCHA"));
|
|
286
295
|
fallOverWithStyle();
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
let _prosopo_types = require("@prosopo/types");
|
|
2
|
+
//#region src/widgetSlot.ts
|
|
3
|
+
var claimedSlots = /* @__PURE__ */ new Map();
|
|
4
|
+
var claimWidgetSlot = (siteKey) => {
|
|
5
|
+
const claimed = claimedSlots.get(siteKey) ?? /* @__PURE__ */ new Set();
|
|
6
|
+
claimedSlots.set(siteKey, claimed);
|
|
7
|
+
for (let slot = 0; slot < _prosopo_types.MAX_WIDGET_SLOT; slot++) if (!claimed.has(slot)) {
|
|
8
|
+
claimed.add(slot);
|
|
9
|
+
return slot;
|
|
10
|
+
}
|
|
11
|
+
return _prosopo_types.MAX_WIDGET_SLOT;
|
|
12
|
+
};
|
|
13
|
+
var releaseWidgetSlot = (siteKey, slot) => {
|
|
14
|
+
const claimed = claimedSlots.get(siteKey);
|
|
15
|
+
if (!claimed) return;
|
|
16
|
+
claimed.delete(slot);
|
|
17
|
+
if (claimed.size === 0) claimedSlots.delete(siteKey);
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.claimWidgetSlot = claimWidgetSlot;
|
|
21
|
+
exports.releaseWidgetSlot = releaseWidgetSlot;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DetectorLoaderFromScript } from "./detectorLoader.js";
|
|
2
2
|
import { takePrefetchedDetector } from "./detectorPrefetch.js";
|
|
3
3
|
import { ProsopoError } from "@prosopo/common";
|
|
4
|
-
import {
|
|
5
|
-
import { ExtensionLoader, getProcaptchaRandomActiveProvider, pickIpMode, resolveClientSessionId } from "@prosopo/procaptcha-common";
|
|
4
|
+
import { ExtensionLoader, getProcaptchaRandomActiveProvider, pickIpMode, resolveClientSessionId, widgetRequestHeaders } from "@prosopo/procaptcha-common";
|
|
6
5
|
import { ProviderApi } from "@prosopo/api";
|
|
6
|
+
import { FINGERPRINT_DISCLOSURE_KEYS, encodeFingerprintProof, getFingerprintProof } from "@prosopo/fingerprint";
|
|
7
7
|
//#region src/customDetectBot.ts
|
|
8
8
|
var ASSIGN_TIMEOUT_MS = 1e4;
|
|
9
9
|
var sanitiseHref = (href) => {
|
|
@@ -69,7 +69,15 @@ var withTimeout = async (promise, ms) => {
|
|
|
69
69
|
throw error;
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
var
|
|
72
|
+
var FINGERPRINT_PROOF_TIMEOUT_MS = 1e3;
|
|
73
|
+
var fingerprintProofIfReady = async () => {
|
|
74
|
+
try {
|
|
75
|
+
return encodeFingerprintProof(await withTimeout(getFingerprintProof(FINGERPRINT_DISCLOSURE_KEYS), FINGERPRINT_PROOF_TIMEOUT_MS));
|
|
76
|
+
} catch {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var customDetectBot = async (config, container, restartFn, retryContext, refreshOf, switchToImage, widgetSlot) => {
|
|
73
81
|
if (!config.account.address) throw new ProsopoError({
|
|
74
82
|
code: "SITE_KEY_MISSING",
|
|
75
83
|
errorSite: "FRIC-2"
|
|
@@ -84,7 +92,7 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
|
|
|
84
92
|
prefetchedResult = void 0;
|
|
85
93
|
}
|
|
86
94
|
const provider = prefetchedResult?.provider ?? await getProcaptchaRandomActiveProvider(config.defaultEnvironment, ipMode, retryContext);
|
|
87
|
-
const providerApi = new ProviderApi(provider.provider.url, config.account.address, void 0,
|
|
95
|
+
const providerApi = new ProviderApi(provider.provider.url, config.account.address, void 0, widgetRequestHeaders(config.language, config.integration));
|
|
88
96
|
let detectorSessionId;
|
|
89
97
|
let providerDetect;
|
|
90
98
|
let detectorOptions;
|
|
@@ -106,7 +114,8 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
|
|
|
106
114
|
if (providerDetect === void 0) {
|
|
107
115
|
const userAccount = await ext.getAccount(config);
|
|
108
116
|
const { currentUrl: fallbackUrl, iframeUrl: fallbackIframeUrl } = getCurrentPageUrls();
|
|
109
|
-
const
|
|
117
|
+
const fallbackFingerprintProof = await fingerprintProofIfReady();
|
|
118
|
+
const captcha = await withTimeout(providerApi.getFrictionlessCaptcha(void 0, void 0, config.account.address, userAccount.account.address, config.mode, void 0, void 0, fallbackUrl, fallbackIframeUrl, clientSessionId, refreshOf, switchToImage, fallbackFingerprintProof, widgetSlot), 1e4);
|
|
110
119
|
if (captcha.dns_url) try {
|
|
111
120
|
fetch(captcha.dns_url, {
|
|
112
121
|
method: "GET",
|
|
@@ -131,7 +140,8 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
|
|
|
131
140
|
const detectionResult = await providerDetect(container, restartFn, () => ext.getAccount(config), detectorOptions);
|
|
132
141
|
const userAccount = detectionResult.userAccount;
|
|
133
142
|
const { currentUrl, iframeUrl } = getCurrentPageUrls();
|
|
134
|
-
const
|
|
143
|
+
const fingerprintProof = await fingerprintProofIfReady();
|
|
144
|
+
const captchaPromise = providerApi.getFrictionlessCaptcha(detectionResult.token, detectionResult.encryptHeadHash, config.account.address, userAccount.account.address, config.mode, void 0, detectorSessionId, currentUrl, iframeUrl, clientSessionId, refreshOf, switchToImage, fingerprintProof, widgetSlot);
|
|
135
145
|
if (detectionResult.getSimdReadings) detectionResult.getSimdReadings(6e4).catch(() => void 0);
|
|
136
146
|
const captcha = await withTimeout(captchaPromise, 1e4);
|
|
137
147
|
if (captcha.dns_url) try {
|