fix(pairing): warn that pairing links grant daemon access (#3734)
A pairing offer remains valid across daemon restarts, so remove the incorrect rotation guidance and warn users where the durable credential is displayed.
This commit is contained in:
1 parent
5123b23f41
commit
8d92e1cc17
14 files changed
+27
-3
No files matched your search
@@ -10,6 +10,9 @@ describe("formatPairingInstructions", () => {
|
||||
|
||||
expect(output).toContain(QR);
|
||||
expect(output.split("\n")).toContain(URL);
|
||||
expect(output).toContain(
|
||||
"Treat this pairing link like a password. Anyone with it can access this daemon.",
|
||||
);
|
||||
});
|
||||
|
||||
it("does not print a QR that would reach the terminal edge", () => {
|
||||
|
||||
@@ -33,5 +33,5 @@ function formatQr(qr: string | null, columns: number | undefined): string {
|
||||
}
|
||||
|
||||
export function formatPairingInstructions({ url, qr, columns }: PairingInstructions): string {
|
||||
return `\nScan to pair:\n${formatQr(qr, columns)}\n\nPairing link:\n${url}\n`;
|
||||
return `\nScan to pair:\n${formatQr(qr, columns)}\n\nPairing link:\n${url}\n\nTreat this pairing link like a password. Anyone with it can access this daemon.\n`;
|
||||
}
|
||||
Reference in new issue
Block a user