mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Stevens (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SSHD-115) Missing return handling SFTP SSH_FXP_OPEN cannot create error
Date Mon, 28 Mar 2011 15:30:06 GMT
Missing return handling SFTP SSH_FXP_OPEN cannot create error
-------------------------------------------------------------

                 Key: SSHD-115
                 URL: https://issues.apache.org/jira/browse/SSHD-115
             Project: MINA SSHD
          Issue Type: Bug
    Affects Versions: 0.5.0
            Reporter: Michael Stevens


Stress testing the SFTP Subsystem I found protocol errors when file creation failed. This
is due to a missing return after the error status is sent.

The patch is simple...

--- SftpSubsystem.java	(revision 1086267)
+++ SftpSubsystem.java	(working copy)
@@ -409,6 +409,7 @@
                             if (((pflags & SSH_FXF_CREAT) != 0)) {
                                 if (!file.isWritable()) {
                                     sendStatus(id, SSH_FX_FAILURE, "Can not create " + path);
+                                    return;
                                 }
                                 file.create();
                             }


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message