Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
zendframework/zendframework#6646 - Removing dangerous internal mutabl…
Browse files Browse the repository at this point in the history
…e state change (password kept in memory!)
  • Loading branch information
Ocramius committed Jan 3, 2015
1 parent 5f1d8d2 commit edacb9b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Prompt/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ final class Password extends AbstractPrompt
*/
private $echo;

/**
* @var string
*/
private $password = '';

/**
* Ask the user for a password
*
Expand All @@ -51,6 +46,8 @@ public function show()

$console->write($this->promptText);

$password = '';

/**
* Read characters from console
*/
Expand All @@ -65,9 +62,9 @@ public function show()
echo "*";
}

$this->password .= $char;
$password .= $char;
}

return $this->password;
return $password;
}
}

0 comments on commit edacb9b

Please sign in to comment.