Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-115

Missing return handling SFTP SSH_FXP_OPEN cannot create error

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.6.0
    • Labels:
      None

      Description

      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();
                                   }
      

        Attachments

          Activity

            People

            • Assignee:
              gnt Guillaume Nodet
              Reporter:
              michael13stevens Michael Stevens
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: