zend-console icon indicating copy to clipboard operation
zend-console copied to clipboard

Infinite loop password prompt

Open GeeH opened this issue 8 years ago • 1 comments

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7560 User: @waltertamboer Created On: 2015-05-30T08:55:03Z Updated At: 2015-11-06T21:58:16Z Body The Zend\Console\Prompt\Password class seems to end up in an infinite loop when ran in an MINGW32 console (giti bash) on Windows machines and in the normal Windows console. (Test on Windwos 8.1 - Zend Framework 2.4.2)

There is a while (true) loop which only breaks when the entered character is equal to PHP_EOL, this never seems to be true.

I'm not sure how this behaves on Mac or Linux machines but maybe it would be better to check for line endings: if (ord($char) === 10 || ord($char) === 13) {

Issue #7559 might be related.


GeeH avatar Jun 28 '16 12:06 GeeH

This repository has been closed and moved to laminas/laminas-console; a new issue has been opened at https://github.com/laminas/laminas-console/issues/7.

weierophinney avatar Dec 31 '19 21:12 weierophinney