Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Infinite loop password prompt #7

Closed
weierophinney opened this issue Dec 31, 2019 · 2 comments
Closed

Infinite loop password prompt #7

weierophinney opened this issue Dec 31, 2019 · 2 comments

Comments

@weierophinney
Copy link
Member

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.



Originally posted by @GeeH at zendframework/zend-console#21

@saulotoledo
Copy link
Contributor

saulotoledo commented Jan 4, 2020

@weierophinney I played a bit with this, but I am not able to submit a full working PR right now. Here is my feedback:

@weierophinney
Copy link
Member Author

This package is abandoned and will receive no further development!

We recommend using laminas/laminas-cli.

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