From 9768e91dc07c723c42a674e61dc479b40942d5b0 Mon Sep 17 00:00:00 2001 From: Ronan Giron Date: Wed, 30 Oct 2024 14:34:39 +0100 Subject: [PATCH] Fixed: missing control of password response (#171) --- 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(); } }