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

Missing return handling SFTP SSH_FXP_OPEN cannot create error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.5.0
    • 0.6.0
    • 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

            gnodet Guillaume Nodet
            michael13stevens Michael Stevens
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: