Skip to content
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

Password prompt freezes program when a long password is entered #270

Open
valentinegb opened this issue Jul 18, 2023 · 5 comments
Open

Password prompt freezes program when a long password is entered #270

valentinegb opened this issue Jul 18, 2023 · 5 comments

Comments

@valentinegb
Copy link

valentinegb commented Jul 18, 2023

I have the following code:

let token: String = Password::with_theme(&ColorfulTheme::default())
    .with_prompt("Please enter your token")
    .interact()?;

Running the code, I paste a 1,571 characters long token into my terminal, and then the program becomes unresponsive.

Using Input does not freeze but it cuts off most of the token and isn't ideal for entering very sensitive information.

I am using dialoguer 0.10.4 on macOS 14.0 Beta (23A5286i).

@Gordon01
Copy link
Contributor

Gordon01 commented Sep 5, 2023

Tested on Windows and Linux, 1 571 chars and more - UI responsive as usual.

@valentinegb
Copy link
Author

Tested on Windows and Linux, 1 571 chars and more - UI responsive as usual.

Is anyone else able to test it on macOS?

@Gordon01
Copy link
Contributor

Gordon01 commented Sep 5, 2023

Do you build in debug or release?

Can you run it under strace and possibly see what is happening during the slowdown?

@valentinegb
Copy link
Author

While I'm developing I build in debug but when making a release I build in release, the problem happens either way.
I don't have strace, looking it up it looks like it's only on Linux but I'm on macOS.

@TeraTorajiro
Copy link

I also encountered a similar phenomenon. When using the Input, I noticed that the pasted text was shortened to about 1000 characters.

I confirmed that the application freezes when using the Password.

I am using dialoguer 0.11.0 on macOS 14.2.1

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

No branches or pull requests

3 participants