diff --git a/cloud/apps/relay/src/idle-regional-rehome-selection.ts b/cloud/apps/relay/src/idle-regional-rehome-selection.ts index bed20527386..f9757016416 100644 --- a/cloud/apps/relay/src/idle-regional-rehome-selection.ts +++ b/cloud/apps/relay/src/idle-regional-rehome-selection.ts @@ -300,7 +300,7 @@ function inlineRows(columns: ReadonlyArray, rows: num } function hostKey(row: SqlRow): string { - return `${String(row.user_id)}${String(row.relay_host_id)}` + return `${String(row.user_id)}\u0000${String(row.relay_host_id)}` } function idleRehomeCandidate( diff --git a/src/main/runtime/browser-client-download-transfers.ts b/src/main/runtime/browser-client-download-transfers.ts index fce33c3638a..8341bacfe3f 100644 --- a/src/main/runtime/browser-client-download-transfers.ts +++ b/src/main/runtime/browser-client-download-transfers.ts @@ -330,5 +330,5 @@ function isDestinationExistsError(error: unknown): boolean { } function sessionKey(browserPageId: string, transferId: string): string { - return `${browserPageId}${transferId}` + return `${browserPageId}\u0000${transferId}` } diff --git a/src/wsl-guest/dispatcher.test.ts b/src/wsl-guest/dispatcher.test.ts index f8ccc11c153..7312ca40214 100644 --- a/src/wsl-guest/dispatcher.test.ts +++ b/src/wsl-guest/dispatcher.test.ts @@ -802,7 +802,7 @@ describe('RelayDispatcher', () => { } // Multi-byte UTF-8, astral pairs, lone surrogates, controls, quotes, and backslashes. - const alphabet = 'aZ9 "\\\n\r\tΓ©ΓŸβ‚¬δΈ­π„žπŸ˜€π€€οΏ½' + const alphabet = 'aZ9 "\\\n\r\t\u0000Γ©ΓŸβ‚¬δΈ­π„žπŸ˜€π€€οΏ½' it('matches the pre-optimization sizing loop across randomized inputs', () => { const random = mulberry32(0xc0ffee)