From 24e6ecdc1c4b5a44cecffd6c493bfd3b5b045652 Mon Sep 17 00:00:00 2001 From: Ronan Giron Date: Tue, 16 Mar 2021 11:47:44 +0100 Subject: [PATCH] Fixed: missing control of password response --- src/TerminalObject/Dynamic/Password.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TerminalObject/Dynamic/Password.php b/src/TerminalObject/Dynamic/Password.php index a8d714cc..5107ee0c 100644 --- a/src/TerminalObject/Dynamic/Password.php +++ b/src/TerminalObject/Dynamic/Password.php @@ -8,6 +8,12 @@ public function prompt() { $this->writePrompt(); - return $this->reader->hidden(); + $response = $this->valueOrDefault($this->reader->hidden()); + + if ($this->isValidResponse($response)) { + return $response; + } + + return $this->prompt(); } }