Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.7.0
-
None
-
Ubuntu 16.04
openjdk version "1.8.0_151"
Description
For `.ssh/authorized_keys` to have forced commands, sometimes AuthorizedKeyEntry parses it in the wrong way.
For
command="./an-executable-script-without-arguments.sh",no-port-forwarding,no-x11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3N...
AuthorizedKeyEntry.getLoginOptions gives Map<String,String> with value
command ./an-executable-script-without-arguments.sh no-agent-forwarding true no-port-forwarding true no-pty true no-x11-forwarding true
which is correct.
But for forced commands with arguments
command="./an-executable-script.sh arg1 arg2",no-port-forwarding,no-x11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3N...
It gives
command "./an-executable-script.sh
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.