| … | … | @@ -134,7 +134,40 @@ export function registerConnectionInCatalog( | |
| 160 | + | registration.profile, | |
| 161 | + | ), | |
| 162 | + | credentials: [ | |
| 163 | + | ...next.credentials.filter((value) => !owners.has(value.connectionId)), | |
🟠 High platform/storageDocument.ts:163
When isNewLogin is true, this stores the fresh credential under every saved bearer route’s own connectionId, so an old http:// route is treated as having its own credential and sendsTokenInClear allows the token to be sent in cleartext. Preserve the credential’s transport provenance and enforce the restriction for paired routes as well.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @packages/client-runtime/src/platform/storageDocument.ts around line 163: |
| 2 | |
| 3 | When `isNewLogin` is true, this stores the fresh credential under every saved bearer route’s own `connectionId`, so an old `http://` route is treated as having its own credential and `sendsTokenInClear` allows the token to be sent in cleartext. Preserve the credential’s transport provenance and enforce the restriction for paired routes as well. |
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Fixed in 80ee0c4cea. A new pairing now copies its login only to paired routes that aren't plain HTTP on LAN or public, unless the pairing itself was over plain HTTP. This uses the same check as tokenAllowsPlainHttp, now shared as isPlainHttpRoute in routes.ts. Test: "a login paired over HTTPS is not copied to a plain HTTP LAN address" in storageDocument.test.ts. It fails on the previous commit.