You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Duboscq (JIRA)" <ji...@apache.org> on 2009/09/12 19:16:57 UTC

[jira] Created: (NET-294) UnixFTPEntryParser fails to parse some entries

UnixFTPEntryParser fails to parse some entries
----------------------------------------------

                 Key: NET-294
                 URL: https://issues.apache.org/jira/browse/NET-294
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Gilles Duboscq


The regex does match the entry but the resulting groups are wrong for exemple, with
-rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
the unix group name group will match "ftp-admin 816026400 Oct" file size group will match "5" first date group will match "2008 bloplab" then the year group will match "7" and the file name group will match "cd1.img"
in this listing :
-rwxrwx---   1 ftp      ftp-admin      771 Oct  5  2008 bloplab 7 cd1.ccd
-rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd1.cue
-rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
-rwxrwx---   1 ftp      ftp-admin 33307200 Oct  5  2008 bloplab 7 cd1.sub
-rwxrwx---   1 ftp      ftp-admin      772 Oct  5  2008 bloplab 7 cd2.ccd
-rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd2.cue
-rwxrwx---   1 ftp      ftp-admin 413902608 Oct  5  2008 bloplab 7 cd2.img
-rwxrwx---   1 ftp      ftp-admin 16893984 Oct  5  2008 bloplab 7 cd2.sub
the 4 entries in which groupname and file size are only separated by one space wont be parsed properly, the others work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (NET-294) UnixFTPEntryParser fails to parse some entries

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754793#action_12754793 ] 

Sebb commented on NET-294:
--------------------------

Thanks for the patch; added some unit tests and applied to 2.0 branch in:

URL: http://svn.apache.org/viewvc?rev=814446&view=rev
Log:
NET-294 UnixFTPEntryParser fails to parse some entries

> UnixFTPEntryParser fails to parse some entries
> ----------------------------------------------
>
>                 Key: NET-294
>                 URL: https://issues.apache.org/jira/browse/NET-294
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Gilles Duboscq
>         Attachments: UnixFTPEntryParser.java.patch
>
>
> The regex does match the entry but the resulting groups are wrong for exemple, with
> {code}
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> {code}
> the unix group name group will match "ftp-admin 816026400 Oct" file size group will match "5" first date group will match "2008 bloplab" then the year group will match "7" and the file name group will match "cd1.img"
> in this listing :
> {code}
> -rwxrwx---   1 ftp      ftp-admin      771 Oct  5  2008 bloplab 7 cd1.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd1.cue
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> -rwxrwx---   1 ftp      ftp-admin 33307200 Oct  5  2008 bloplab 7 cd1.sub
> -rwxrwx---   1 ftp      ftp-admin      772 Oct  5  2008 bloplab 7 cd2.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd2.cue
> -rwxrwx---   1 ftp      ftp-admin 413902608 Oct  5  2008 bloplab 7 cd2.img
> -rwxrwx---   1 ftp      ftp-admin 16893984 Oct  5  2008 bloplab 7 cd2.sub
> {code}
> the 4 entries in which groupname and file size are only separated by one space wont be parsed properly, the others work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (NET-294) UnixFTPEntryParser fails to parse some entries

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved NET-294.
----------------------

       Resolution: Fixed
    Fix Version/s: 2.1
                   1.5

Same fix applied to trunk:

URL: http://svn.apache.org/viewvc?rev=814451&view=rev
Log:
NET-294 UnixFTPEntryParser fails to parse some entries


> UnixFTPEntryParser fails to parse some entries
> ----------------------------------------------
>
>                 Key: NET-294
>                 URL: https://issues.apache.org/jira/browse/NET-294
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Gilles Duboscq
>             Fix For: 1.5, 2.1
>
>         Attachments: UnixFTPEntryParser.java.patch
>
>
> The regex does match the entry but the resulting groups are wrong for exemple, with
> {code}
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> {code}
> the unix group name group will match "ftp-admin 816026400 Oct" file size group will match "5" first date group will match "2008 bloplab" then the year group will match "7" and the file name group will match "cd1.img"
> in this listing :
> {code}
> -rwxrwx---   1 ftp      ftp-admin      771 Oct  5  2008 bloplab 7 cd1.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd1.cue
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> -rwxrwx---   1 ftp      ftp-admin 33307200 Oct  5  2008 bloplab 7 cd1.sub
> -rwxrwx---   1 ftp      ftp-admin      772 Oct  5  2008 bloplab 7 cd2.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd2.cue
> -rwxrwx---   1 ftp      ftp-admin 413902608 Oct  5  2008 bloplab 7 cd2.img
> -rwxrwx---   1 ftp      ftp-admin 16893984 Oct  5  2008 bloplab 7 cd2.sub
> {code}
> the 4 entries in which groupname and file size are only separated by one space wont be parsed properly, the others work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-294) UnixFTPEntryParser fails to parse some entries

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-294:
---------------------

    Fix Version/s:     (was: 2.1)
                   2.2

> UnixFTPEntryParser fails to parse some entries
> ----------------------------------------------
>
>                 Key: NET-294
>                 URL: https://issues.apache.org/jira/browse/NET-294
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Gilles Duboscq
>             Fix For: 1.5, 2.2
>
>         Attachments: UnixFTPEntryParser.java.patch
>
>
> The regex does match the entry but the resulting groups are wrong for exemple, with
> {code}
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> {code}
> the unix group name group will match "ftp-admin 816026400 Oct" file size group will match "5" first date group will match "2008 bloplab" then the year group will match "7" and the file name group will match "cd1.img"
> in this listing :
> {code}
> -rwxrwx---   1 ftp      ftp-admin      771 Oct  5  2008 bloplab 7 cd1.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd1.cue
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> -rwxrwx---   1 ftp      ftp-admin 33307200 Oct  5  2008 bloplab 7 cd1.sub
> -rwxrwx---   1 ftp      ftp-admin      772 Oct  5  2008 bloplab 7 cd2.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd2.cue
> -rwxrwx---   1 ftp      ftp-admin 413902608 Oct  5  2008 bloplab 7 cd2.img
> -rwxrwx---   1 ftp      ftp-admin 16893984 Oct  5  2008 bloplab 7 cd2.sub
> {code}
> the 4 entries in which groupname and file size are only separated by one space wont be parsed properly, the others work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-294) UnixFTPEntryParser fails to parse some entries

Posted by "Gilles Duboscq (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles Duboscq updated NET-294:
-------------------------------

    Attachment: UnixFTPEntryParser.java.patch

Indeed, enforcing a 3 char month and a 1 or 2 char day seem to go through all present JUnit tests and works with the case i submitted. See patch

> UnixFTPEntryParser fails to parse some entries
> ----------------------------------------------
>
>                 Key: NET-294
>                 URL: https://issues.apache.org/jira/browse/NET-294
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Gilles Duboscq
>         Attachments: UnixFTPEntryParser.java.patch
>
>
> The regex does match the entry but the resulting groups are wrong for exemple, with
> {code}
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> {code}
> the unix group name group will match "ftp-admin 816026400 Oct" file size group will match "5" first date group will match "2008 bloplab" then the year group will match "7" and the file name group will match "cd1.img"
> in this listing :
> {code}
> -rwxrwx---   1 ftp      ftp-admin      771 Oct  5  2008 bloplab 7 cd1.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd1.cue
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> -rwxrwx---   1 ftp      ftp-admin 33307200 Oct  5  2008 bloplab 7 cd1.sub
> -rwxrwx---   1 ftp      ftp-admin      772 Oct  5  2008 bloplab 7 cd2.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd2.cue
> -rwxrwx---   1 ftp      ftp-admin 413902608 Oct  5  2008 bloplab 7 cd2.img
> -rwxrwx---   1 ftp      ftp-admin 16893984 Oct  5  2008 bloplab 7 cd2.sub
> {code}
> the 4 entries in which groupname and file size are only separated by one space wont be parsed properly, the others work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (NET-294) UnixFTPEntryParser fails to parse some entries

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754687#action_12754687 ] 

Sebb commented on NET-294:
--------------------------

Perhaps this could be solved by being stricter about the date formats that are allowed, e.g. insisting on a 4 digit year and 3 character month.

> UnixFTPEntryParser fails to parse some entries
> ----------------------------------------------
>
>                 Key: NET-294
>                 URL: https://issues.apache.org/jira/browse/NET-294
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Gilles Duboscq
>
> The regex does match the entry but the resulting groups are wrong for exemple, with
> {code}
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> {code}
> the unix group name group will match "ftp-admin 816026400 Oct" file size group will match "5" first date group will match "2008 bloplab" then the year group will match "7" and the file name group will match "cd1.img"
> in this listing :
> {code}
> -rwxrwx---   1 ftp      ftp-admin      771 Oct  5  2008 bloplab 7 cd1.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd1.cue
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> -rwxrwx---   1 ftp      ftp-admin 33307200 Oct  5  2008 bloplab 7 cd1.sub
> -rwxrwx---   1 ftp      ftp-admin      772 Oct  5  2008 bloplab 7 cd2.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd2.cue
> -rwxrwx---   1 ftp      ftp-admin 413902608 Oct  5  2008 bloplab 7 cd2.img
> -rwxrwx---   1 ftp      ftp-admin 16893984 Oct  5  2008 bloplab 7 cd2.sub
> {code}
> the 4 entries in which groupname and file size are only separated by one space wont be parsed properly, the others work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-294) UnixFTPEntryParser fails to parse some entries

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-294:
---------------------

    Description: 
The regex does match the entry but the resulting groups are wrong for exemple, with
{code}
-rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
{code}
the unix group name group will match "ftp-admin 816026400 Oct" file size group will match "5" first date group will match "2008 bloplab" then the year group will match "7" and the file name group will match "cd1.img"
in this listing :
{code}
-rwxrwx---   1 ftp      ftp-admin      771 Oct  5  2008 bloplab 7 cd1.ccd
-rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd1.cue
-rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
-rwxrwx---   1 ftp      ftp-admin 33307200 Oct  5  2008 bloplab 7 cd1.sub
-rwxrwx---   1 ftp      ftp-admin      772 Oct  5  2008 bloplab 7 cd2.ccd
-rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd2.cue
-rwxrwx---   1 ftp      ftp-admin 413902608 Oct  5  2008 bloplab 7 cd2.img
-rwxrwx---   1 ftp      ftp-admin 16893984 Oct  5  2008 bloplab 7 cd2.sub
{code}
the 4 entries in which groupname and file size are only separated by one space wont be parsed properly, the others work

  was:
The regex does match the entry but the resulting groups are wrong for exemple, with
-rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
the unix group name group will match "ftp-admin 816026400 Oct" file size group will match "5" first date group will match "2008 bloplab" then the year group will match "7" and the file name group will match "cd1.img"
in this listing :
-rwxrwx---   1 ftp      ftp-admin      771 Oct  5  2008 bloplab 7 cd1.ccd
-rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd1.cue
-rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
-rwxrwx---   1 ftp      ftp-admin 33307200 Oct  5  2008 bloplab 7 cd1.sub
-rwxrwx---   1 ftp      ftp-admin      772 Oct  5  2008 bloplab 7 cd2.ccd
-rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd2.cue
-rwxrwx---   1 ftp      ftp-admin 413902608 Oct  5  2008 bloplab 7 cd2.img
-rwxrwx---   1 ftp      ftp-admin 16893984 Oct  5  2008 bloplab 7 cd2.sub
the 4 entries in which groupname and file size are only separated by one space wont be parsed properly, the others work


Add markup to ensure spaces are preserved in the listings

> UnixFTPEntryParser fails to parse some entries
> ----------------------------------------------
>
>                 Key: NET-294
>                 URL: https://issues.apache.org/jira/browse/NET-294
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Gilles Duboscq
>
> The regex does match the entry but the resulting groups are wrong for exemple, with
> {code}
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> {code}
> the unix group name group will match "ftp-admin 816026400 Oct" file size group will match "5" first date group will match "2008 bloplab" then the year group will match "7" and the file name group will match "cd1.img"
> in this listing :
> {code}
> -rwxrwx---   1 ftp      ftp-admin      771 Oct  5  2008 bloplab 7 cd1.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd1.cue
> -rwxrwx---   1 ftp      ftp-admin 816026400 Oct  5  2008 bloplab 7 cd1.img
> -rwxrwx---   1 ftp      ftp-admin 33307200 Oct  5  2008 bloplab 7 cd1.sub
> -rwxrwx---   1 ftp      ftp-admin      772 Oct  5  2008 bloplab 7 cd2.ccd
> -rwxrwx---   1 ftp      ftp-admin       76 Oct  5  2008 bloplab 7 cd2.cue
> -rwxrwx---   1 ftp      ftp-admin 413902608 Oct  5  2008 bloplab 7 cd2.img
> -rwxrwx---   1 ftp      ftp-admin 16893984 Oct  5  2008 bloplab 7 cd2.sub
> {code}
> the 4 entries in which groupname and file size are only separated by one space wont be parsed properly, the others work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.