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

Wrong creationTime in writeAttrs for SFTP

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0
    • None

    Description

      InĀ SftpHelper#writeAttrsV4 the lastAccessTime is written instead of the creationTime.

      if ((flags & SftpConstants.SSH_FILEXFER_ATTR_CREATETIME) != 0) {
          buffer = writeTime(buffer, version, flags, lastAccessTime);
      }
      

      In my implementation I have a creationTime but no lastAccessTime so this cause a NPE (the flag is set because creationTime is not null but lastAccessTime is null when trying to write it), but this still write the wrong date even if both are available. Most clients seems to only show the lastModifiedTime though, so this is probably not very visible in most cases.

      Attachments

        Activity

          People

            twolf Thomas Wolf
            spadou Samuel Padou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m