You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2022/07/27 10:48:00 UTC

[jira] [Comment Edited] (VFS-822) getGroupIds fails when user has no groups

    [ https://issues.apache.org/jira/browse/VFS-822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17571835#comment-17571835 ] 

Gary D. Gregory edited comment on VFS-822 at 7/27/22 10:47 AM:
---------------------------------------------------------------

[~van der Walle] 

Thank you for your report.

Would you mind posting a stack trace?

Does your use case also touch [https://github.com/apache/commons-vfs/blob/e538088c2f8cc9c31d742e39cc0f6b5d316f3474/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java#L319]

?


was (Author: garydgregory):
[~van der Walle] 

Thank you for your report.

Would you mind posting a stack trace?

> getGroupIds fails when user has no groups
> -----------------------------------------
>
>                 Key: VFS-822
>                 URL: https://issues.apache.org/jira/browse/VFS-822
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.9.0
>            Reporter: Mark van der Walle
>            Priority: Major
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)