Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Prev Previous commit
Next Next commit
removed sanity check on entered characters
  • Loading branch information
ibetitsmike committed Apr 22, 2025
commit 8d6de7b47e28bc0093ee96c2aefc1f6ef9d4ae3e
9 changes: 3 additions & 6 deletions cli/cliui/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,9 @@ func readSecretInput(f *os.File, w io.Writer) (string, error) {
_, _ = w.Write([]byte("\b \b"))
}
default:
// Only append printable characters
if buf[0] >= 32 && buf[0] <= 126 {
line += string(buf[0])
// Print the mask character
_, _ = w.Write([]byte("*"))
}
line += string(buf[0])
// Print the mask character
_, _ = w.Write([]byte("*"))
}
}
}
Loading