[jira] Created: (COMPRESS-114) determine name for TarEntries with special characters in TarUtils.parseName

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (COMPRESS-114) TarUtils.parseName does not properly handle characters outside the range 0-127

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/COMPRESS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895222#action_12895222 ]

Pavel edited comment on COMPRESS-114 at 8/4/10 7:25 AM:
--------------------------------------------------------

Hi Stefan,

thanks for a swift reply!

I'm using Sun JDK 1.6.0_06, if it helps. I've checked out the project using Eclipse 3.6 and built it with the Maven plugin for Eclipse.

thx

      was (Author: partysan):
    Hi Stefan,

thanks for a swift reply!

I'm using Sun JDK 1.6.0_06, if it helps

thx
 

> TarUtils.parseName does not properly handle characters outside the range 0-127
> ------------------------------------------------------------------------------
>
>                 Key: COMPRESS-114
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-114
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windows/Suse
>            Reporter: Helmut M.
>             Fix For: 1.1
>
>         Attachments: plusMinusForJIRAwithLicense.tar, TarArchiveEntry.java, TarArchiveInputStream.java, TarUtils.java
>
>
> if a tarfile contains files with special characters, the names of the tar entries are wrong.
> example:
> correct name: 0302-0601-3±±±F06±W220±ZB±LALALA±±±±±±±±±±CAN±±DC±±±04±060302±MOE.model
> name resolved by TarUtils.parseName: 0302-0101-3ᄆᄆᄆF06ᄆW220ᄆZBᄆHECKMODULᄆᄆᄆᄆᄆᄆᄆᄆᄆᄆECEᄆᄆDCᄆᄆᄆ07ᄆ060302ᄆDOERN.model
> please use:
> result.append(new String(new byte[] { buffer[i] }));
> instead of:
> result.append((char) buffer[i]);
> to solve this encoding problem.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (COMPRESS-114) TarUtils.parseName does not properly handle characters outside the range 0-127

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/COMPRESS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel updated COMPRESS-114:
---------------------------

    Comment: was deleted

(was: Hi Stefan,

thanks for a swift reply!

I'm using Sun JDK 1.6.0_06, if it helps. I've checked out the project using Eclipse 3.6 and built it with the Maven plugin for Eclipse.

thx)

> TarUtils.parseName does not properly handle characters outside the range 0-127
> ------------------------------------------------------------------------------
>
>                 Key: COMPRESS-114
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-114
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windows/Suse
>            Reporter: Helmut M.
>             Fix For: 1.1
>
>         Attachments: plusMinusForJIRAwithLicense.tar, TarArchiveEntry.java, TarArchiveInputStream.java, TarUtils.java
>
>
> if a tarfile contains files with special characters, the names of the tar entries are wrong.
> example:
> correct name: 0302-0601-3±±±F06±W220±ZB±LALALA±±±±±±±±±±CAN±±DC±±±04±060302±MOE.model
> name resolved by TarUtils.parseName: 0302-0101-3ᄆᄆᄆF06ᄆW220ᄆZBᄆHECKMODULᄆᄆᄆᄆᄆᄆᄆᄆᄆᄆECEᄆᄆDCᄆᄆᄆ07ᄆ060302ᄆDOERN.model
> please use:
> result.append(new String(new byte[] { buffer[i] }));
> instead of:
> result.append((char) buffer[i]);
> to solve this encoding problem.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (COMPRESS-114) TarUtils.parseName does not properly handle characters outside the range 0-127

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/COMPRESS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895228#action_12895228 ]

Pavel commented on COMPRESS-114:
--------------------------------

Stefan, thanks for a swift reply,

I'm using Sun JDK 1.6.0_14_b08, but I've just tried it with OpenJDK 1.6.0_0-b12 and have the same result...

In case it helps: I've checked out the trunc using Eclipse 3.6 (Subversive plugin) and build it using Maven2 plugin

> TarUtils.parseName does not properly handle characters outside the range 0-127
> ------------------------------------------------------------------------------
>
>                 Key: COMPRESS-114
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-114
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windows/Suse
>            Reporter: Helmut M.
>             Fix For: 1.1
>
>         Attachments: plusMinusForJIRAwithLicense.tar, TarArchiveEntry.java, TarArchiveInputStream.java, TarUtils.java
>
>
> if a tarfile contains files with special characters, the names of the tar entries are wrong.
> example:
> correct name: 0302-0601-3±±±F06±W220±ZB±LALALA±±±±±±±±±±CAN±±DC±±±04±060302±MOE.model
> name resolved by TarUtils.parseName: 0302-0101-3ᄆᄆᄆF06ᄆW220ᄆZBᄆHECKMODULᄆᄆᄆᄆᄆᄆᄆᄆᄆᄆECEᄆᄆDCᄆᄆᄆ07ᄆ060302ᄆDOERN.model
> please use:
> result.append(new String(new byte[] { buffer[i] }));
> instead of:
> result.append((char) buffer[i]);
> to solve this encoding problem.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (COMPRESS-114) TarUtils.parseName does not properly handle characters outside the range 0-127

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/COMPRESS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895228#action_12895228 ]

Pavel edited comment on COMPRESS-114 at 8/4/10 8:01 AM:
--------------------------------------------------------

Stefan, thanks for a swift reply,

I'm using Sun JDK 1.6.0_14_b08, but I've just tried it with OpenJDK 1.6.0_0-b12 and have the same result...

In case it helps: I've checked out the trunc using Eclipse 3.6 (Subversive plugin) and build it using Maven2 plugin

Do you know where I can get a commons-compress.jar (1.1) distro?

thx

      was (Author: partysan):
    Stefan, thanks for a swift reply,

I'm using Sun JDK 1.6.0_14_b08, but I've just tried it with OpenJDK 1.6.0_0-b12 and have the same result...

In case it helps: I've checked out the trunc using Eclipse 3.6 (Subversive plugin) and build it using Maven2 plugin
 

> TarUtils.parseName does not properly handle characters outside the range 0-127
> ------------------------------------------------------------------------------
>
>                 Key: COMPRESS-114
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-114
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windows/Suse
>            Reporter: Helmut M.
>             Fix For: 1.1
>
>         Attachments: plusMinusForJIRAwithLicense.tar, TarArchiveEntry.java, TarArchiveInputStream.java, TarUtils.java
>
>
> if a tarfile contains files with special characters, the names of the tar entries are wrong.
> example:
> correct name: 0302-0601-3±±±F06±W220±ZB±LALALA±±±±±±±±±±CAN±±DC±±±04±060302±MOE.model
> name resolved by TarUtils.parseName: 0302-0101-3ᄆᄆᄆF06ᄆW220ᄆZBᄆHECKMODULᄆᄆᄆᄆᄆᄆᄆᄆᄆᄆECEᄆᄆDCᄆᄆᄆ07ᄆ060302ᄆDOERN.model
> please use:
> result.append(new String(new byte[] { buffer[i] }));
> instead of:
> result.append((char) buffer[i]);
> to solve this encoding problem.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (COMPRESS-114) TarUtils.parseName does not properly handle characters outside the range 0-127

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/COMPRESS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895379#action_12895379 ]

Stefan Bodewig commented on COMPRESS-114:
-----------------------------------------

A snapshot I compiled myself can be found at http://people.apache.org/~bodewig/commons-compress-1.1-SNAPSHOT.jar and I'll remove it once 1.1 has been released.

The unit tests pass for me on my Ubuntu system and it's pretty likely it is more of an environment setting thing.  I may also note that the tests pass in the Apache Gump builds both on Linux (Ubuntu 8.4) and Solaris 10.

Returning to the original problem, commons-compress really doesn't implement POSIX tar or even comes close to it.  It mostly lives at the least common denominator of all tar dialects, ustar.  And this means the only characters that are really supported come from the seven bit ASCII set - with anything else you can only hope it works.



> TarUtils.parseName does not properly handle characters outside the range 0-127
> ------------------------------------------------------------------------------
>
>                 Key: COMPRESS-114
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-114
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windows/Suse
>            Reporter: Helmut M.
>             Fix For: 1.1
>
>         Attachments: plusMinusForJIRAwithLicense.tar, TarArchiveEntry.java, TarArchiveInputStream.java, TarUtils.java
>
>
> if a tarfile contains files with special characters, the names of the tar entries are wrong.
> example:
> correct name: 0302-0601-3±±±F06±W220±ZB±LALALA±±±±±±±±±±CAN±±DC±±±04±060302±MOE.model
> name resolved by TarUtils.parseName: 0302-0101-3ᄆᄆᄆF06ᄆW220ᄆZBᄆHECKMODULᄆᄆᄆᄆᄆᄆᄆᄆᄆᄆECEᄆᄆDCᄆᄆᄆ07ᄆ060302ᄆDOERN.model
> please use:
> result.append(new String(new byte[] { buffer[i] }));
> instead of:
> result.append((char) buffer[i]);
> to solve this encoding problem.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (COMPRESS-114) TarUtils.parseName does not properly handle characters outside the range 0-127

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/COMPRESS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895608#action_12895608 ]

Helmut M. commented on COMPRESS-114:
------------------------------------

Hi,

I've tested it at the time when the bug was fixed by Sebb on following OS:
- Ubuntu
- Windows
- Mac

and the solution worked fine.

grz

> TarUtils.parseName does not properly handle characters outside the range 0-127
> ------------------------------------------------------------------------------
>
>                 Key: COMPRESS-114
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-114
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windows/Suse
>            Reporter: Helmut M.
>             Fix For: 1.1
>
>         Attachments: plusMinusForJIRAwithLicense.tar, TarArchiveEntry.java, TarArchiveInputStream.java, TarUtils.java
>
>
> if a tarfile contains files with special characters, the names of the tar entries are wrong.
> example:
> correct name: 0302-0601-3±±±F06±W220±ZB±LALALA±±±±±±±±±±CAN±±DC±±±04±060302±MOE.model
> name resolved by TarUtils.parseName: 0302-0101-3ᄆᄆᄆF06ᄆW220ᄆZBᄆHECKMODULᄆᄆᄆᄆᄆᄆᄆᄆᄆᄆECEᄆᄆDCᄆᄆᄆ07ᄆ060302ᄆDOERN.model
> please use:
> result.append(new String(new byte[] { buffer[i] }));
> instead of:
> result.append((char) buffer[i]);
> to solve this encoding problem.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (COMPRESS-114) TarUtils.parseName does not properly handle characters outside the range 0-127

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/COMPRESS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Helmut M. closed COMPRESS-114.
------------------------------


see last comment. issue was tested on several OS

> TarUtils.parseName does not properly handle characters outside the range 0-127
> ------------------------------------------------------------------------------
>
>                 Key: COMPRESS-114
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-114
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windows/Suse
>            Reporter: Helmut M.
>             Fix For: 1.1
>
>         Attachments: plusMinusForJIRAwithLicense.tar, TarArchiveEntry.java, TarArchiveInputStream.java, TarUtils.java
>
>
> if a tarfile contains files with special characters, the names of the tar entries are wrong.
> example:
> correct name: 0302-0601-3±±±F06±W220±ZB±LALALA±±±±±±±±±±CAN±±DC±±±04±060302±MOE.model
> name resolved by TarUtils.parseName: 0302-0101-3ᄆᄆᄆF06ᄆW220ᄆZBᄆHECKMODULᄆᄆᄆᄆᄆᄆᄆᄆᄆᄆECEᄆᄆDCᄆᄆᄆ07ᄆ060302ᄆDOERN.model
> please use:
> result.append(new String(new byte[] { buffer[i] }));
> instead of:
> result.append((char) buffer[i]);
> to solve this encoding problem.

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

12