wrathematics / getPass

Password function for R with masking (where supported)
Other
47 stars 5 forks source link

Inconsistent behavior on Windows between cmd/RStudio #16

Open tonytonov opened 4 years ago

tonytonov commented 4 years ago

Hi! I'm observing something quite unexpected when the message prompt contains a word "username".

My expectation is to have identical behavior regardless of msg. For example, without GUI all looks fine:

R> getPass("username: ")
username: ***
[1] "123"

When using the same call in RStudio, however, I see image

The password is not masked. Adding forcemask = TRUE doesn't help either. After a bit of digging around, I discovered that the culprit is rstudioapi::askForPassword. I'll take this issue to them, but I think you should be aware anyways.

My use case is a prompt like "Enter password for username %username%".

tonytonov commented 4 years ago

Reported to rstudioapi via https://github.com/rstudio/rstudioapi/issues/195.