Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-822

[SFTP] getGroupIds() throws NumberFormatException when a user has no groups

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9.0
    • 2.10.0
    • None

    Description

      In https://github.com/apache/commons-vfs/blob/master/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java#L258 the groupIds are retrieved using the command id -G. If a user has no groups (gid=0 for example) then the result is that:

      https://github.com/apache/commons-vfs/blob/master/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java#L264

      will have an array with one entry being an empty string. This results in a NumberFormatException.

      Attachments

        Activity

          People

            Unassigned Unassigned
            van der Walle Mark van der Walle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: