You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0528bc8
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,11 @@
25
25
26
26
-**Development and test dependencies refreshed (`npm audit` 16 to 5 moderate, all development-only; 0 for what ships).** The repository overrides `ws` to `^8.23.0` (GHSA-37g9-w4hg-h9qr, reached through `socket.io-client` -> `engine.io-client`) and takes the non-breaking `npm audit fix` updates (typescript-eslint, mocha, terser, eslint-plugin-import-x). An override does not reach applications that install `@pryv/socket.io`: the add-on's README now tells Node.js applications to add the same `ws` override until `engine.io-client` allows a fixed `ws`.
27
27
28
-
## 3.22.0 - 2026-12-01
28
+
## 3.22.0 - 2026-12-04
29
29
30
30
`pryv`, `@pryv/socket.io`, `@pryv/monitor`, `@pryv/delegation`, `@pryv/encryption` 3.22.0 (`@pryv/cmc` unchanged at
31
-
3.26.0): the sign-in button label format can be set by the service.
31
+
3.26.0): the sign-in button label format can be set by the service, and an apiEndpoint is read the way `new URL()`
32
+
reads it (security).
32
33
33
34
### Added
34
35
@@ -37,6 +38,28 @@
37
38
language (e.g. "Sign in with Health Data Safe") in its `buttonSignInMessages.json`. Default `{LOGIN}: {serviceName}`:
38
39
the label is unchanged for services that do not define it.
39
40
41
+
### Security
42
+
43
+
-**`pryv`: an `apiEndpoint` is read the way `new URL()` reads it, and an ambiguous one is refused.**
44
+
`utils.extractTokenAndAPIEndpoint` (used by `new pryv.Connection(apiEndpoint)`) took everything up to the last `@`
45
+
as the token, so an `@` in the path, query or fragment (`https://good.example/@other.example/`) made the library call
46
+
another host than the one `new URL(apiEndpoint).host` names: an application that checks the host of an endpoint it
47
+
received before opening a connection could be sent elsewhere, with the token text. The token is now the user part of
48
+
the authority only; an endpoint with an `@` after the authority, more than one `@`, a backslash, white space or a
49
+
control character throws `Invalid apiEndpoint: ambiguous URL`. The endpoint is now read against a strict grammar:
50
+
`http` or `https` only, a token of URL user-part characters without `:` or `%` (a `user:password@` part is refused),
51
+
an ASCII host name (a Unicode name is given in its `xn--` form), IPv4 or bracketed IPv6 address with an optional
52
+
port, a path without query or fragment; and
53
+
`new URL()` must parse it to the same host. A value that is not a string (a `URL` object), or a string with
54
+
surrounding white space or a trailing newline, now throws instead of being accepted. `utils.buildAPIEndpoint` refuses
55
+
a token outside that grammar and checks that what it builds reads back the same; `Service.buildAPIEndpoint` (and so
56
+
`apiEndpointFor`, `login`, the MFA calls) refuses a username other than letters, digits and `-`, which could move the
57
+
endpoint, and the password sent to it, to another host. `utils.decomposeAPIEndpoint` names no username when the part
58
+
matching the template is not one (`https://tok@other.example/x.pryv.me/` is not on pryv.me). `@pryv/socket.io`
59
+
percent-encodes the token in its query. Pryv endpoints never hold the refused forms, so valid endpoints parse as
60
+
before (`connection.endpoint` keeps the host as written). Applications that validate an endpoint should compare
61
+
`new URL(connection.endpoint).host`, the endpoint the library calls.
62
+
40
63
## 3.26.0 - 2026-12-01
41
64
42
65
`@pryv/cmc` 3.26.0 only (`pryv` and the other packages stay 3.21.0): revoke helpers wait for the outcome and throw on
0 commit comments