New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added password prompt to Console #6646

Closed
wants to merge 8 commits into
base: master
from

Conversation

Projects
None yet
7 participants
@richardjh
Contributor

richardjh commented Sep 7, 2014

SImple prompt that doesn't echo back (or can echo *s). Useful for reading in passwords.
If accepted I'll write up the documentation too.

@eddiejaoude

View changes

Show outdated Hide outdated library/Zend/Console/Prompt/Password.php
@eddiejaoude

This comment has been minimized.

Show comment
Hide comment
@eddiejaoude

eddiejaoude Sep 7, 2014

Contributor

Nice one. 👍

Contributor

eddiejaoude commented Sep 7, 2014

Nice one. 👍

@eddiejaoude

View changes

Show outdated Hide outdated library/Zend/Console/Prompt/Password.php
@samsonasik

View changes

Show outdated Hide outdated library/Zend/Console/Prompt/Password.php
@eddiejaoude

This comment has been minimized.

Show comment
Hide comment
@eddiejaoude

eddiejaoude Sep 8, 2014

Contributor

The tests seem to pass, but the build gets terminated...No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.

End of output...

...............................................................  63 / 151 ( 41%)
.........S..S....................................SSSSSS........ 126 / 151 ( 83%)
...................SSSSSS
Time: 1.69 seconds, Memory: 12.25Mb
OK, but incomplete or skipped tests!
Tests: 151, Assertions: 333, Skipped: 14.
Generating code coverage report in PHP format ... done
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated
Contributor

eddiejaoude commented Sep 8, 2014

The tests seem to pass, but the build gets terminated...No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.

End of output...

...............................................................  63 / 151 ( 41%)
.........S..S....................................SSSSSS........ 126 / 151 ( 83%)
...................SSSSSS
Time: 1.69 seconds, Memory: 12.25Mb
OK, but incomplete or skipped tests!
Tests: 151, Assertions: 333, Skipped: 14.
Generating code coverage report in PHP format ... done
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated
@eddiejaoude

This comment has been minimized.

Show comment
Hide comment
@eddiejaoude

eddiejaoude Sep 8, 2014

Contributor

I was not able to request Travis to rebuild this branch.

I looked at previous commits in this branch and they fail on Travis for the same reason. Tests seem to pass fine, the build gets terminated.

@richardjh Is it worth merging master in again?

Contributor

eddiejaoude commented Sep 8, 2014

I was not able to request Travis to rebuild this branch.

I looked at previous commits in this branch and they fail on Travis for the same reason. Tests seem to pass fine, the build gets terminated.

@richardjh Is it worth merging master in again?

@eddiejaoude

This comment has been minimized.

Show comment
Hide comment
@eddiejaoude

eddiejaoude Sep 8, 2014

Contributor

I just checked master build and it is failing for the same reason!

Contributor

eddiejaoude commented Sep 8, 2014

I just checked master build and it is failing for the same reason!

@richardjh

This comment has been minimized.

Show comment
Hide comment
@richardjh

richardjh Sep 8, 2014

Contributor

@eddiejaoude, are you saying I need to pull the master branch from zendframework/zf2 into my master branch on richardjh/zf2 again?

Contributor

richardjh commented Sep 8, 2014

@eddiejaoude, are you saying I need to pull the master branch from zendframework/zf2 into my master branch on richardjh/zf2 again?

@eddiejaoude

This comment has been minimized.

Show comment
Hide comment
@eddiejaoude

eddiejaoude Sep 8, 2014

Contributor

Originally, I was suggesting updating your PR branch (richardjh/zf2:master) with the master of zendframework/zf2:master - but when I checked the source branch (zendframework/zf2:master), it is failing too.

So probably no need, unless there is a manual conflict to resolve before your PR gets merged in - as they are new files, it is unlikely there will be a future conflict.

Contributor

eddiejaoude commented Sep 8, 2014

Originally, I was suggesting updating your PR branch (richardjh/zf2:master) with the master of zendframework/zf2:master - but when I checked the source branch (zendframework/zf2:master), it is failing too.

So probably no need, unless there is a manual conflict to resolve before your PR gets merged in - as they are new files, it is unlikely there will be a future conflict.

@asgrim

This comment has been minimized.

Show comment
Hide comment
@asgrim

asgrim Sep 8, 2014

Contributor

Just a little suggestion, what about making the "mask" character configurable? (e.g. if someone wanted to use # instead of * to mask the password)

Contributor

asgrim commented Sep 8, 2014

Just a little suggestion, what about making the "mask" character configurable? (e.g. if someone wanted to use # instead of * to mask the password)

@eddiejaoude

This comment has been minimized.

Show comment
Hide comment
@eddiejaoude

eddiejaoude Sep 8, 2014

Contributor

@asgrim good idea 👍

Contributor

eddiejaoude commented Sep 8, 2014

@asgrim good idea 👍

@prolic

View changes

Show outdated Hide outdated library/Zend/Console/Prompt/Password.php
@prolic

View changes

Show outdated Hide outdated library/Zend/Console/Prompt/Password.php
Changed "Password : " to "Password: "
Changed the default password prompt, that you can change anyway because @prolic said so.
@richardjh

This comment has been minimized.

Show comment
Hide comment
@richardjh

richardjh Dec 4, 2014

Contributor

Not sure if anyone is waiting for this or needs a password prompt, but I have added richardjh\zf2-password to packagist [ https://packagist.org/packages/richardjh/zf2-password ] so you can install the password prompt as a module if you like.

Contributor

richardjh commented Dec 4, 2014

Not sure if anyone is waiting for this or needs a password prompt, but I have added richardjh\zf2-password to packagist [ https://packagist.org/packages/richardjh/zf2-password ] so you can install the password prompt as a module if you like.

@eddiejaoude

This comment has been minimized.

Show comment
Hide comment
@eddiejaoude

eddiejaoude Dec 4, 2014

Contributor

Thanks @richardjh 👍

Contributor

eddiejaoude commented Dec 4, 2014

Thanks @richardjh 👍

@prolic

This comment has been minimized.

Show comment
Hide comment
@prolic

prolic Dec 4, 2014

Contributor

nice

Contributor

prolic commented Dec 4, 2014

nice

@Ocramius Ocramius added this to the 2.4.0 milestone Dec 24, 2014

@Ocramius Ocramius self-assigned this Dec 24, 2014

@samsonasik

View changes

Show outdated Hide outdated library/Zend/Console/Prompt/Password.php
@samsonasik

View changes

Show outdated Hide outdated tests/ZendTest/Console/Prompt/PasswordTest.php
@richardjh

This comment has been minimized.

Show comment
Hide comment
@richardjh

richardjh Jan 1, 2015

Contributor

Thanks @samsonasik I have updated copyright dates.

Contributor

richardjh commented Jan 1, 2015

Thanks @samsonasik I have updated copyright dates.

@Ocramius

This comment has been minimized.

Show comment
Hide comment
@Ocramius

Ocramius Jan 3, 2015

Member

This is just stuck because the console prompt is waiting forever for input by the user (during the while loop execution). I'm changing the tests so that they mock out the console adapter.

Member

Ocramius commented Jan 3, 2015

This is just stuck because the console prompt is waiting forever for input by the user (during the while loop execution). I'm changing the tests so that they mock out the console adapter.

@Ocramius

This comment has been minimized.

Show comment
Hide comment
@Ocramius

Ocramius Jan 3, 2015

Member

Will need to rewrite some bits of this before pushing it out (due to security issues). Additionally, I think the echo functionality should just go away (security concerns).

Member

Ocramius commented Jan 3, 2015

Will need to rewrite some bits of this before pushing it out (due to security issues). Additionally, I think the echo functionality should just go away (security concerns).

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

#6646 - Testing via explicit mocking instead of via an actual console…
… adapter (which would hang forever, waiting for input)

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

#6646 - while entering a password, no output should be produced by th…
…e password prompt unless strictly specified

Ocramius added a commit that referenced this pull request Jan 3, 2015

Ocramius added a commit that referenced this pull request Jan 3, 2015

@Ocramius

This comment has been minimized.

Show comment
Hide comment
@Ocramius

Ocramius Jan 3, 2015

Member

This was merged into develop at 306c17a

I had to rewrite some bits because the prompt was actually acting really weird when entering multiple rapidly subsequent chars: figured that (for security) the best solution was to clear the line at every keystroke instead.

Member

Ocramius commented Jan 3, 2015

This was merged into develop at 306c17a

I had to rewrite some bits because the prompt was actually acting really weird when entering multiple rapidly subsequent chars: figured that (for security) the best solution was to clear the line at every keystroke instead.

@Ocramius Ocramius closed this Jan 3, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

zendframework/zendframework#6646 - Testing via explicit mocking inste…
…ad of via an actual console adapter (which would hang forever, waiting for input)

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

zendframework/zendframework#6646 - echo operations should happen thro…
…ugh the console adapter, not through direct buffer output

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

zendframework/zendframework#6646 - while entering a password, no outp…
…ut should be produced by the password prompt unless strictly specified

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment