Skip to content

Commit 36fe2d2

Browse files
committed
refactor: mask username display in connection details for enhanced security
1 parent 7cfc7a9 commit 36fe2d2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

rocketadmin-agent/src/helpers/cli/interactive-prompts.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,7 @@ export class InteractivePrompts {
412412
console.log(` ${chalk.gray('Host:')} ${chalk.white(config.host)}`);
413413
console.log(` ${chalk.gray('Port:')} ${chalk.white(config.port)}`);
414414
if (config.username) {
415-
const maskedUsername = config.username.length > 2
416-
? config.username.slice(0, 2) + '*'.repeat(Math.min(config.username.length - 2, 6))
417-
: '**';
418-
console.log(` ${chalk.gray('Username:')} ${chalk.white(maskedUsername)}`);
415+
console.log(` ${chalk.gray('Username:')} ${chalk.white('[set]')}`);
419416
}
420417
if (config.database) {
421418
console.log(` ${chalk.gray('Database:')} ${chalk.white(config.database)}`);

0 commit comments

Comments
 (0)