[ 
https://issues.apache.org/jira/browse/SSHD-796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on SSHD-796 started by Goldstein Lyor.
-------------------------------------------
> AuthorizedKeyEntry parses `loginOptions` in a wrong way
> -------------------------------------------------------
>
>                 Key: SSHD-796
>                 URL: https://issues.apache.org/jira/browse/SSHD-796
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 1.7.0
>         Environment: Ubuntu 16.04
> openjdk version "1.8.0_151"
>            Reporter: Cong-Xin Qiu
>            Assignee: Goldstein Lyor
>            Priority: Minor
>         Attachments: ApacheMinaSshdTest.java
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> For `.ssh/authorized_keys` to have forced commands, sometimes 
> AuthorizedKeyEntry parses it in the wrong way.
> For
> {code:java}
> command="./an-executable-script-without-arguments.sh",no-port-forwarding,no-x11-forwarding,no-agent-forwarding,no-pty
>  ssh-rsa AAAAB3N...
> {code}
> AuthorizedKeyEntry.getLoginOptions gives Map<String,String> with value
> {code:java}
> command            ./an-executable-script-without-arguments.sh
> no-agent-forwarding            true
> no-port-forwarding            true
> no-pty            true
> no-x11-forwarding            true
> {code}
> which is correct.
> But for forced commands with arguments
> {code:java}
> command="./an-executable-script.sh arg1 
> arg2",no-port-forwarding,no-x11-forwarding,no-agent-forwarding,no-pty ssh-rsa 
> AAAAB3N...
> {code}
> It gives
> {code:java}
> command            "./an-executable-script.sh
> {code}
> Which is wrong.
> It seems skip the blank space, so missed all following options. And it also 
> didn't remove the quotation mark.
> Maybe there is some parsing error in here.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to