[ 
https://issues.apache.org/jira/browse/KARAF-5382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16173152#comment-16173152
 ] 

Tom Quarendon commented on KARAF-5382:
--------------------------------------

My feeling is that if anyone is using this to capture passwords from users, 
there's a subtle bug there that means that what the user types (which can't be 
seen) and what the application will receive will be different.
I'm now doing everything with my own LineReader objects as I feel that the 
session.readLine method isn't suitable for any purpose I can think of.
Since I don't know what the intended use case for session.readLine is, I can't 
comment on any suggested changes. I would have instantiated a new LineReader 
for the purpose each time, but I don't know whether people would depend on 
history being connected up for example, whether changing that might upset some 
people. Having highlighting seems non-useful. Having it do anything weird with 
backslashes or quotes, to me, is unhelpful for the circumstances I can think of 
in which this might be used, but as I say, I don't know what the intended use 
of this was.

> Karaf shell session.readLine consumes backslashes
> -------------------------------------------------
>
>                 Key: KARAF-5382
>                 URL: https://issues.apache.org/jira/browse/KARAF-5382
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>            Reporter: Tom Quarendon
>
> I don't know what the intended use case is for session.readLine, but the 
> behaviour w.r.t backslashes is odd.
> I use is to prompt for a password from the user. So in an action, call 
> session.readLine("prompt", '*'). However, if the user's password contains a 
> backslash, readLine doesn't return what the user typed, which is mighty 
> confusing. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to