@prosopo/types-database 5.7.2 → 5.8.0
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 +4 -7
- package/.turbo/turbo-build$colon$tsc.log +15 -18
- package/.turbo/turbo-build.log +5 -11
- package/CHANGELOG.md +111 -0
- package/LICENSE +201 -0
- package/dist/cjs/types/client.cjs +8 -0
- package/dist/cjs/types/provider.cjs +140 -4
- package/dist/types/client.d.ts +12 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client.js +8 -0
- package/dist/types/client.js.map +1 -1
- package/dist/types/provider.d.ts +182 -12
- package/dist/types/provider.d.ts.map +1 -1
- package/dist/types/provider.js +140 -4
- package/dist/types/provider.js.map +1 -1
- package/dist/types/schemas.test.js +52 -1
- package/dist/types/schemas.test.js.map +1 -1
- package/package.json +61 -62
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
> @prosopo/types-database@5.7.2 build:cjs
|
|
3
|
-
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
|
-
|
|
1
|
+
$ NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
5
2
|
ViteCommonJSConfig: .
|
|
6
3
|
{
|
|
7
4
|
tsConfigPaths: [
|
|
@@ -45,7 +42,7 @@ dist/cjs/types/spamEmailDomain.cjs 0.25 kB │ gzip: 0.17 kB
|
|
|
45
42
|
dist/cjs/types/captcha.cjs 0.99 kB │ gzip: 0.27 kB
|
|
46
43
|
dist/cjs/types/index.cjs 2.50 kB │ gzip: 0.49 kB
|
|
47
44
|
dist/cjs/index.cjs 2.60 kB │ gzip: 0.54 kB
|
|
48
|
-
dist/cjs/types/client.cjs 8.
|
|
49
|
-
dist/cjs/types/provider.cjs
|
|
45
|
+
dist/cjs/types/client.cjs 8.50 kB │ gzip: 1.76 kB
|
|
46
|
+
dist/cjs/types/provider.cjs 30.76 kB │ gzip: 4.80 kB
|
|
50
47
|
|
|
51
|
-
[32m✓ built in
|
|
48
|
+
[32m✓ built in 47ms[39m
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> tsc --build --verbose
|
|
4
|
-
|
|
5
|
-
8:25:44 PM - Projects in this build:
|
|
1
|
+
$ tsc --build --verbose
|
|
2
|
+
1:37:49 PM - Projects in this build:
|
|
6
3
|
* ../../dev/config/tsconfig.json
|
|
7
4
|
* ../util/tsconfig.json
|
|
8
5
|
* ../locale/tsconfig.json
|
|
@@ -16,29 +13,29 @@
|
|
|
16
13
|
* ../user-access-policy/tsconfig.json
|
|
17
14
|
* tsconfig.json
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
1:37:49 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/tsconfig.tsbuildinfo'
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
1:37:49 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
1:37:49 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
1:37:49 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
1:37:49 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
1:37:49 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
1:37:49 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
32
29
|
|
|
33
|
-
|
|
30
|
+
1:37:49 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
|
|
34
31
|
|
|
35
|
-
|
|
32
|
+
1:37:49 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
1:37:49 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
1:37:49 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/ruleRecord.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
1:37:49 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
42
39
|
|
|
43
|
-
|
|
40
|
+
1:37:49 PM - Building project '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json'...
|
|
44
41
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
> @prosopo/types-database@5.7.2 build:cross-env
|
|
7
|
-
> vite build --config vite.esm.config.ts --mode production
|
|
8
|
-
|
|
1
|
+
$ pnpm run build:cross-env --mode ${NODE_ENV:-development}
|
|
2
|
+
$ vite build --config vite.esm.config.ts --mode production
|
|
9
3
|
ViteEsmConfig: .
|
|
10
4
|
{
|
|
11
5
|
tsConfigPaths: [
|
|
@@ -50,7 +44,7 @@ dist/types/spamEmailDomain.js 0.23 kB │ gzip: 0.17 kB
|
|
|
50
44
|
dist/types/captcha.js 0.82 kB │ gzip: 0.25 kB
|
|
51
45
|
dist/types/index.js 1.65 kB │ gzip: 0.39 kB
|
|
52
46
|
dist/index.js 1.72 kB │ gzip: 0.42 kB
|
|
53
|
-
dist/types/client.js 8.
|
|
54
|
-
dist/types/provider.js
|
|
47
|
+
dist/types/client.js 8.31 kB │ gzip: 1.81 kB
|
|
48
|
+
dist/types/provider.js 29.56 kB │ gzip: 4.79 kB
|
|
55
49
|
|
|
56
|
-
[32m✓ built in
|
|
50
|
+
[32m✓ built in 46ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,116 @@
|
|
|
1
1
|
# @prosopo/types-database
|
|
2
2
|
|
|
3
|
+
## 5.8.0
|
|
4
|
+
### Minor Changes
|
|
5
|
+
|
|
6
|
+
- 1c13037: Add `captchaTypeFeatureFlags` to site settings, starting with `puzzle`. Setting
|
|
7
|
+
`puzzle: false` stops a site being served the puzzle captcha by any path: its
|
|
8
|
+
configured `captchaType`, `frictionlessTypes`, access policies, the traffic
|
|
9
|
+
filter, routing machines, PoW escalation, and puzzle sessions that already
|
|
10
|
+
exist. A site pinned to puzzle gets an image captcha instead (or PoW if image is
|
|
11
|
+
also off). The field is optional and has no stored default, so sites that never
|
|
12
|
+
set it behave exactly as before. The flag is meant for Prosopo staff, not site
|
|
13
|
+
owners.
|
|
14
|
+
- f961dab: Store everything needed to redraw a puzzle, so the portal can show the exact challenge a user was served.
|
|
15
|
+
|
|
16
|
+
Until now a puzzle record kept the target, the origin and the accuracy required (`tolerance`), and
|
|
17
|
+
nothing else. The things that decide what the puzzle actually looked like — how many decoy shapes were
|
|
18
|
+
scattered on it, how dark they were, how big the piece was, and which background was used — were
|
|
19
|
+
picked per challenge and then thrown away. So you could see that someone failed by 11px and had no way
|
|
20
|
+
to know whether they had been handed an easy puzzle or a nasty one.
|
|
21
|
+
|
|
22
|
+
Puzzle records now carry a `render` object with all of it: the difficulty ladder level, the piece size,
|
|
23
|
+
the frame geometry, the five render settings, and the two 128-bit seeds that regenerate the imagery.
|
|
24
|
+
Given those, the portal reproduces the background and the piece byte for byte.
|
|
25
|
+
|
|
26
|
+
To make that possible the renderer had to become reproducible. `renderPuzzle` and `createBackground`
|
|
27
|
+
now take an optional seed and report the one they used, instead of generating one internally and
|
|
28
|
+
discarding it; the background pool hands out each image together with its seed. Default behaviour is
|
|
29
|
+
unchanged — omit the seed and you still get a fresh random one.
|
|
30
|
+
|
|
31
|
+
The ladder level is new on the session too (`puzzleLevel`), because it was computed when the puzzle
|
|
32
|
+
was escalated and never written down anywhere. It is absent when the ladder did not choose the
|
|
33
|
+
puzzle — a site-configured puzzle or a traffic-filter override has no level.
|
|
34
|
+
|
|
35
|
+
The record is patched after the imagery is produced rather than written with the rest of the record,
|
|
36
|
+
because the piece size and the seeds only exist once the render has run, and the target has to be
|
|
37
|
+
durable before it is expressed in pixels. If that patch fails it is logged and ignored: losing a
|
|
38
|
+
diagnostic must not cost the user their solve. Records written before this change, and any challenge
|
|
39
|
+
whose render threw, simply have no `render`.
|
|
40
|
+
|
|
41
|
+
**The seeds are secret.** `puzzle-assets/src/prng.ts` explains why: they regenerate the clean
|
|
42
|
+
background, and a clean background can be diffed against the composite to read the target position
|
|
43
|
+
straight off. They were previously barred from leaving the provider entirely. They may now sit on the
|
|
44
|
+
captcha record, and nowhere else — not in a response, not in a log, not on the session. Anything that
|
|
45
|
+
exposes a puzzle record to a caller has to drop `render.backgroundSeed` and `render.renderSeed`, and
|
|
46
|
+
must not serve them at all while the challenge is still live. The comment in `prng.ts` now says so.
|
|
47
|
+
|
|
48
|
+
Test coverage. Three guards, each confirmed to fail when the thing it protects is broken:
|
|
49
|
+
`renderReplay.unit.test.ts` re-renders from the stored fields and asserts the bytes match, with one
|
|
50
|
+
case per field asserting that changing *only* that field changes the output — so a record missing a
|
|
51
|
+
field cannot pass; `puzzleRenderer.unit.test.ts` replays through the same entry points the portal would
|
|
52
|
+
use, which catches a background paired with the wrong seed; and `schemas.test.ts` asserts every
|
|
53
|
+
sub-field survives a strict-mode mongoose write, since a field absent from the schema is dropped
|
|
54
|
+
silently and would store nothing at all.
|
|
55
|
+
- dcb691b: Add a refresh control to the puzzle captcha.
|
|
56
|
+
|
|
57
|
+
A user who can't solve the puzzle they were given can now ask for a different one, from a button in the puzzle's header. The replacement comes through a new frictionless session, like a wrong answer already does.
|
|
58
|
+
|
|
59
|
+
The widget tells the provider which session was refreshed (`refreshOf`). The provider then records `refreshOf`, `refreshCount` and `refreshedAfterMs` on the new session, so refresh behaviour can be scored later. After three refreshes in a row it serves an image challenge instead, with reason `PUZZLE_REFRESH_LIMIT`. It only does this if the site has image enabled. The switch only goes from puzzle to image, so a client that lies about its refreshes can only make its own challenge harder. A client that leaves the field out gets a normal session, the same as reloading the page.
|
|
60
|
+
|
|
61
|
+
The image widget's reload button now reports itself as a refresh too. That way a user who was moved onto image isn't sent back to the puzzle by their next reload.
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- dd4c27c: Store the whole-SYN fields the tcp-probe sidecar now reports.
|
|
66
|
+
|
|
67
|
+
The sidecar's handshake record grew from 80 to 104 bytes and the tail was reordered (prosopo/Protect#1167). chaddy was updated to read both layouts and to forward the new fields as their own headers (prosopo/chaddy#16, #17); this is the provider side of that, so the values have somewhere to land instead of being dropped at the middleware.
|
|
68
|
+
|
|
69
|
+
Twelve new fields on `Session`, all optional: `tcpOptsKinds`, `tcpOptsPresent`, `tcpOptsCount`, `tcpTsval`, `tcpTsecr`, `tcpFlags`, `tcpDataOffsetResv`, `tcpUrgPtr`, `ipIdent`, `ipTotalLen`, `ipFragFlags`, `ipTos`. They are surfaced on the decision-machine input the same way the existing TCP fields are, so routing and verify rules can read them.
|
|
70
|
+
|
|
71
|
+
`tcpOptsKinds` is stored decoded — the IANA kind number of each TCP option in wire order, `[2, 4, 8, 1, 3]` on an ordinary Linux SYN. The probe emits it packed into a u64, and a u64 reaches 2^64 while a JS number is exact only to 2^53, so the packed form could not be held without rounding; the rounding would land in the low bytes, which are the option kinds themselves. The array holds the same information and is queryable per position. It also replaces the old `tcpOptsOrder`, which packed 4 bits per option and so could not tell MSS from TCP Fast Open, or Window Scale from MD5, and could not represent MPTCP at all.
|
|
72
|
+
|
|
73
|
+
`tcpOptsFlags` and `tcpOptsOrder` are kept and still read. A pronode running an older chaddy still sends them, and years of rows hold them, so removing them would both lose the rollout window and break any routing rule already reading them. They go undefined on new sessions once the fleet is rolled.
|
|
74
|
+
|
|
75
|
+
`tcpTsval` and `tcpTsecr` are written only when the Timestamps option was actually on the SYN. A TSval of 0 is legal and a TSecr of 0 is expected, so neither can use zero to mean absent.
|
|
76
|
+
|
|
77
|
+
Six places named every one of these fields by hand — the middleware's copy onto the request, the session write, and four task files building the decision-machine bag. They now all go through one list, with a compile-time check that every field of `RawTlsSignals` is on it. That is not tidying: the Session projection comment in `@prosopo/types-database` records a field being missed in exactly this way, after which the rules reading it got `undefined` and silently never fired against real traffic.
|
|
78
|
+
|
|
79
|
+
Separately, the provider compose no longer defaults the sidecar to `prosopo/tcp-probe:latest`. The probe's reply is a bare fixed-size struct with no version in it, so the image tag is the only statement of which layout a host serves, and publishing `:latest` would change that on every pronode at the next pull with nobody running a deploy. The default is now the `0.1.1` both Protect inventories already pin.
|
|
80
|
+
|
|
81
|
+
Tests: the new headers all parse; a packed value above 2^53 decodes without losing its low bytes; the kind pairs the old encoding aliased stay distinct; a trailing end-of-option-list terminates the list rather than appearing in it; an all-zero packed value reads as absent rather than as an empty list; malformed and out-of-range values are ignored; the legacy header pair is still read; and a zero is kept rather than dropped, since `ipIdent` 0 and `tcpTsecr` 0 are real readings.
|
|
82
|
+
- Updated dependencies [1c13037]
|
|
83
|
+
- Updated dependencies [f961dab]
|
|
84
|
+
- Updated dependencies [7d57d2a]
|
|
85
|
+
- Updated dependencies [dcb691b]
|
|
86
|
+
- Updated dependencies [80b7780]
|
|
87
|
+
- Updated dependencies [dd4c27c]
|
|
88
|
+
- @prosopo/types@5.13.0
|
|
89
|
+
- @prosopo/locale@3.7.0
|
|
90
|
+
- @prosopo/common@3.1.62
|
|
91
|
+
- @prosopo/user-access-policy@3.14.15
|
|
92
|
+
- @prosopo/logger@2.1.3
|
|
93
|
+
|
|
94
|
+
## 5.7.3
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- 06784d0: Translation keys are now a typed union built from the English catalogue, so calling the translator with a key that does not exist fails to compile. Error classes only pass a message to the translator when it is a real catalogue key, and free-text messages are shown as they are.
|
|
98
|
+
- Updated dependencies [ede4352]
|
|
99
|
+
- Updated dependencies [2145922]
|
|
100
|
+
- Updated dependencies [8ed0eb8]
|
|
101
|
+
- Updated dependencies [06784d0]
|
|
102
|
+
- Updated dependencies [06784d0]
|
|
103
|
+
- Updated dependencies [4461043]
|
|
104
|
+
- Updated dependencies [92edebd]
|
|
105
|
+
- Updated dependencies [54a07f3]
|
|
106
|
+
- Updated dependencies [b75e9b7]
|
|
107
|
+
- Updated dependencies [6d5b7f5]
|
|
108
|
+
- @prosopo/types@5.12.0
|
|
109
|
+
- @prosopo/locale@3.6.2
|
|
110
|
+
- @prosopo/common@3.1.61
|
|
111
|
+
- @prosopo/user-access-policy@3.14.14
|
|
112
|
+
- @prosopo/logger@2.1.2
|
|
113
|
+
|
|
3
114
|
## 5.7.2
|
|
4
115
|
### Patch Changes
|
|
5
116
|
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2022 PROSOPO LIMITED
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -184,6 +184,13 @@ var UserSettingsSchema = new mongoose.Schema({
|
|
|
184
184
|
}, { _id: false }),
|
|
185
185
|
default: () => ({ ..._prosopo_types.frictionlessTypesDefault })
|
|
186
186
|
},
|
|
187
|
+
captchaTypeFeatureFlags: {
|
|
188
|
+
type: new mongoose.Schema({ puzzle: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
required: false
|
|
191
|
+
} }, { _id: false }),
|
|
192
|
+
required: false
|
|
193
|
+
},
|
|
187
194
|
powDifficulty: {
|
|
188
195
|
type: Number,
|
|
189
196
|
default: _prosopo_types.powDifficultyDefault
|
|
@@ -393,6 +400,7 @@ var AccountSchema = new mongoose.Schema({
|
|
|
393
400
|
captchaType: String,
|
|
394
401
|
frictionlessThreshold: mongoose.Schema.Types.Mixed,
|
|
395
402
|
frictionlessTypes: mongoose.Schema.Types.Mixed,
|
|
403
|
+
captchaTypeFeatureFlags: mongoose.Schema.Types.Mixed,
|
|
396
404
|
ipValidationRules: IPValidationRulesSchema
|
|
397
405
|
},
|
|
398
406
|
createdAt: Number,
|
|
@@ -529,6 +529,63 @@ var PuzzleCaptchaRecordSchema = new mongoose.Schema({
|
|
|
529
529
|
providerSignature: {
|
|
530
530
|
type: String,
|
|
531
531
|
required: true
|
|
532
|
+
},
|
|
533
|
+
render: {
|
|
534
|
+
type: new mongoose.Schema({
|
|
535
|
+
level: {
|
|
536
|
+
type: Number,
|
|
537
|
+
required: false
|
|
538
|
+
},
|
|
539
|
+
pieceSize: {
|
|
540
|
+
type: Number,
|
|
541
|
+
required: true
|
|
542
|
+
},
|
|
543
|
+
geometry: {
|
|
544
|
+
width: {
|
|
545
|
+
type: Number,
|
|
546
|
+
required: true
|
|
547
|
+
},
|
|
548
|
+
height: {
|
|
549
|
+
type: Number,
|
|
550
|
+
required: true
|
|
551
|
+
},
|
|
552
|
+
notchSize: {
|
|
553
|
+
type: Number,
|
|
554
|
+
required: true
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
settings: {
|
|
558
|
+
decoyCount: {
|
|
559
|
+
type: Number,
|
|
560
|
+
required: true
|
|
561
|
+
},
|
|
562
|
+
decoyEdgeDarkness: {
|
|
563
|
+
type: Number,
|
|
564
|
+
required: true
|
|
565
|
+
},
|
|
566
|
+
decoyBodyBrightness: {
|
|
567
|
+
type: Number,
|
|
568
|
+
required: true
|
|
569
|
+
},
|
|
570
|
+
holeDarken: {
|
|
571
|
+
type: Number,
|
|
572
|
+
required: true
|
|
573
|
+
},
|
|
574
|
+
decoyHoleDarken: {
|
|
575
|
+
type: Number,
|
|
576
|
+
required: true
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
backgroundSeed: {
|
|
580
|
+
type: String,
|
|
581
|
+
required: true
|
|
582
|
+
},
|
|
583
|
+
renderSeed: {
|
|
584
|
+
type: String,
|
|
585
|
+
required: true
|
|
586
|
+
}
|
|
587
|
+
}, { _id: false }),
|
|
588
|
+
required: false
|
|
532
589
|
}
|
|
533
590
|
});
|
|
534
591
|
PuzzleCaptchaRecordSchema.index({ challenge: 1 });
|
|
@@ -1040,6 +1097,10 @@ var SessionRecordSchema = new mongoose.Schema({
|
|
|
1040
1097
|
type: Object,
|
|
1041
1098
|
required: false
|
|
1042
1099
|
},
|
|
1100
|
+
puzzleLevel: {
|
|
1101
|
+
type: Number,
|
|
1102
|
+
required: false
|
|
1103
|
+
},
|
|
1043
1104
|
storedAtTimestamp: {
|
|
1044
1105
|
type: Date,
|
|
1045
1106
|
required: false,
|
|
@@ -1079,6 +1140,18 @@ var SessionRecordSchema = new mongoose.Schema({
|
|
|
1079
1140
|
type: String,
|
|
1080
1141
|
required: false
|
|
1081
1142
|
},
|
|
1143
|
+
refreshOf: {
|
|
1144
|
+
type: String,
|
|
1145
|
+
required: false
|
|
1146
|
+
},
|
|
1147
|
+
refreshCount: {
|
|
1148
|
+
type: Number,
|
|
1149
|
+
required: false
|
|
1150
|
+
},
|
|
1151
|
+
refreshedAfterMs: {
|
|
1152
|
+
type: Number,
|
|
1153
|
+
required: false
|
|
1154
|
+
},
|
|
1082
1155
|
decryptedHeadHash: {
|
|
1083
1156
|
type: String,
|
|
1084
1157
|
required: false,
|
|
@@ -1214,15 +1287,63 @@ var SessionRecordSchema = new mongoose.Schema({
|
|
|
1214
1287
|
type: Number,
|
|
1215
1288
|
required: false
|
|
1216
1289
|
},
|
|
1217
|
-
|
|
1290
|
+
tcpWindow: {
|
|
1218
1291
|
type: Number,
|
|
1219
1292
|
required: false
|
|
1220
1293
|
},
|
|
1221
|
-
|
|
1294
|
+
tcpOptsKinds: {
|
|
1295
|
+
type: [Number],
|
|
1296
|
+
required: false
|
|
1297
|
+
},
|
|
1298
|
+
tcpOptsPresent: {
|
|
1222
1299
|
type: Number,
|
|
1223
1300
|
required: false
|
|
1224
1301
|
},
|
|
1225
|
-
|
|
1302
|
+
tcpOptsCount: {
|
|
1303
|
+
type: Number,
|
|
1304
|
+
required: false
|
|
1305
|
+
},
|
|
1306
|
+
tcpTsval: {
|
|
1307
|
+
type: Number,
|
|
1308
|
+
required: false
|
|
1309
|
+
},
|
|
1310
|
+
tcpTsecr: {
|
|
1311
|
+
type: Number,
|
|
1312
|
+
required: false
|
|
1313
|
+
},
|
|
1314
|
+
tcpFlags: {
|
|
1315
|
+
type: Number,
|
|
1316
|
+
required: false
|
|
1317
|
+
},
|
|
1318
|
+
tcpDataOffsetResv: {
|
|
1319
|
+
type: Number,
|
|
1320
|
+
required: false
|
|
1321
|
+
},
|
|
1322
|
+
tcpUrgPtr: {
|
|
1323
|
+
type: Number,
|
|
1324
|
+
required: false
|
|
1325
|
+
},
|
|
1326
|
+
ipIdent: {
|
|
1327
|
+
type: Number,
|
|
1328
|
+
required: false
|
|
1329
|
+
},
|
|
1330
|
+
ipTotalLen: {
|
|
1331
|
+
type: Number,
|
|
1332
|
+
required: false
|
|
1333
|
+
},
|
|
1334
|
+
ipFragFlags: {
|
|
1335
|
+
type: Number,
|
|
1336
|
+
required: false
|
|
1337
|
+
},
|
|
1338
|
+
ipTos: {
|
|
1339
|
+
type: Number,
|
|
1340
|
+
required: false
|
|
1341
|
+
},
|
|
1342
|
+
tcpOptsFlags: {
|
|
1343
|
+
type: Number,
|
|
1344
|
+
required: false
|
|
1345
|
+
},
|
|
1346
|
+
tcpOptsOrder: {
|
|
1226
1347
|
type: Number,
|
|
1227
1348
|
required: false
|
|
1228
1349
|
},
|
|
@@ -1468,6 +1589,7 @@ var SESSION_PROJECTION = {
|
|
|
1468
1589
|
solvedImagesCount: 1,
|
|
1469
1590
|
puzzleTolerance: 1,
|
|
1470
1591
|
puzzle: 1,
|
|
1592
|
+
puzzleLevel: 1,
|
|
1471
1593
|
powDifficulty: 1,
|
|
1472
1594
|
ruleType: 1,
|
|
1473
1595
|
isProtect: 1,
|
|
@@ -1477,6 +1599,8 @@ var SESSION_PROJECTION = {
|
|
|
1477
1599
|
bundleId: 1,
|
|
1478
1600
|
dnsEvent: 1,
|
|
1479
1601
|
originSessionId: 1,
|
|
1602
|
+
refreshCount: 1,
|
|
1603
|
+
createdAt: 1,
|
|
1480
1604
|
currentUrl: 1,
|
|
1481
1605
|
iframeUrl: 1,
|
|
1482
1606
|
clientMetaData: 1,
|
|
@@ -1488,9 +1612,21 @@ var SESSION_PROJECTION = {
|
|
|
1488
1612
|
observedTtl: 1,
|
|
1489
1613
|
tcpMss: 1,
|
|
1490
1614
|
tcpWscale: 1,
|
|
1615
|
+
tcpWindow: 1,
|
|
1616
|
+
tcpOptsKinds: 1,
|
|
1617
|
+
tcpOptsPresent: 1,
|
|
1618
|
+
tcpOptsCount: 1,
|
|
1619
|
+
tcpTsval: 1,
|
|
1620
|
+
tcpTsecr: 1,
|
|
1621
|
+
tcpFlags: 1,
|
|
1622
|
+
tcpDataOffsetResv: 1,
|
|
1623
|
+
tcpUrgPtr: 1,
|
|
1624
|
+
ipIdent: 1,
|
|
1625
|
+
ipTotalLen: 1,
|
|
1626
|
+
ipFragFlags: 1,
|
|
1627
|
+
ipTos: 1,
|
|
1491
1628
|
tcpOptsFlags: 1,
|
|
1492
1629
|
tcpOptsOrder: 1,
|
|
1493
|
-
tcpWindow: 1,
|
|
1494
1630
|
"headers.user-agent": 1,
|
|
1495
1631
|
"headers.accept": 1,
|
|
1496
1632
|
"headers.accept-language": 1,
|