Skip to content

Commit f4c483c

Browse files
committed
fix(web): SSH password prompt text hides the address too
1 parent 39254da commit f4c483c

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎apps/web/src/components/desktop/SshPasswordPromptDialog.tsx‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isSshNetworkAddress } from "@t3tools/client-runtime/connection";
1+
import { isSshNetworkAddress, redactSshAddresses } from "@t3tools/client-runtime/connection";
22
import type { DesktopSshPasswordPromptRequest } from "@t3tools/contracts";
33
import { useEffect, useId, useRef, useState } from "react";
44

@@ -189,7 +189,14 @@ function ActiveSshPasswordPrompt({
189189
>
190190
<div className="space-y-2">
191191
<div className="flex items-center justify-between gap-3">
192-
<p className="text-sm font-medium text-foreground">{request.prompt}</p>
192+
<p className="text-sm font-medium text-foreground">
193+
{redactSshAddresses(request.prompt, {
194+
alias: request.destination,
195+
hostname: request.destination,
196+
username: request.username,
197+
port: null,
198+
})}
199+
</p>
193200
{remainingLabel ? (
194201
<span
195202
className={

0 commit comments

Comments
 (0)