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

Infinite loop password prompt #21

Open
GeeH opened this issue Jun 28, 2016 · 1 comment
Open

Infinite loop password prompt #21

GeeH opened this issue Jun 28, 2016 · 1 comment

Comments

@GeeH
Copy link
Contributor

GeeH commented Jun 28, 2016

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.


@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-console; a new issue has been opened at laminas/laminas-console#7.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants