[
https://issues.apache.org/jira/browse/SSHD-1211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17405736#comment-17405736
]
Kaushal Kumar commented on SSHD-1211:
-------------------------------------
Hi [~lgoldstein] - Thanks for your input. I have used the delegate to move
forward. Since "sudo scp" is equivalent to "scp", and there could be a scenario
where commands starting with sudo scp has to be processed by default
scpCommand. This fix will help us to avoid adding additional classes. Its
entirely upto team to provide the default (inbuilt) support.
> ScpCommandFactory does not allow "sudo scp..." commands
> -------------------------------------------------------
>
> Key: SSHD-1211
> URL: https://issues.apache.org/jira/browse/SSHD-1211
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 2.7.0
> Reporter: Kaushal Kumar
> Assignee: Lyor Goldstein
> Priority: Major
>
> ScpCommandFactory validates if the command is valid via
> [isSupportedCommand|https://github.com/apache/mina-sshd/blob/master/sshd-scp/src/main/java/org/apache/sshd/scp/server/ScpCommandFactory.java#L219].
> Here it check if the command starts with "scp".
> This check blocks any command which starts with "sudo scp". Kindly check if
> this could be resolved.
> As far as i see the change will be required at 2 location.
> #
> [https://github.com/apache/mina-sshd/blob/master/sshd-scp/src/main/java/org/apache/sshd/scp/server/ScpCommandFactory.java#L219]
> #
> https://github.com/apache/mina-sshd/blob/master/sshd-scp/src/main/java/org/apache/sshd/scp/server/ScpCommand.java#L111
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]