You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Marc-Olivier PICOREAU (JIRA)" <xa...@xml.apache.org> on 2008/10/22 14:28:46 UTC

[jira] Created: (XALANJ-2461) Incorrect URL (systemId) handling : specials characters not decoded

Incorrect URL (systemId) handling : specials characters not decoded
-------------------------------------------------------------------

                 Key: XALANJ-2461
                 URL: https://issues.apache.org/jira/browse/XALANJ-2461
             Project: XalanJ2
          Issue Type: Bug
      Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects.  Anybody can view the issue.)
          Components: transformation
    Affects Versions: 2.7
         Environment: Windows XP SP2, Sun JDK 1.6.0_01, Xalan 2.7.0
            Reporter: Marc-Olivier PICOREAU


I think there is a bug in class TransformerIdentityImpl, method createResultContentHandler.
A file-URL is converted to a file simply by removing file:// or file:/ prefix.
It works until we have URL-encoded specials characters like spaces converted to %20.

String fileURL = sresult.getSystemId();
[...]
m_outputStream = new java.io.FileOutputStream(fileURL);

I think the following solution would be great (already suggested in this issue : XALANJ-2182)

String fileURL = sresult.getSystemId();
File file = new File(new URI(fileURL));
m_outputStream = new java.io.FileOutputStream(file);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Issue Comment Edited: (XALANJ-2461) Incorrect URL (systemId) handling : specials characters not decoded

Posted by "Michael Vorburger (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANJ-2461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865215#action_12865215 ] 

Michael Vorburger edited comment on XALANJ-2461 at 5/7/10 11:38 AM:
--------------------------------------------------------------------

This is really a pain, is still present in 2.7.1 as well, and causes never ending issues in apps using Xalan through e.g. Cocoon, when you have directories with spaces.

XALANJ-2511 has been separately opened after this one about the same but IMHO is a duplicate that could be closed.

XALANJ-2182 is an earlier issue which was incorrectly closed as duplicate of XALANJ-1978, which was wrong IMHO.

      was (Author: vorburger):
    This is really a pain, and causes never ending issues in apps using Xalan through e.g. Cocoon, when you have directories with spaces.

XALANJ-2511 has been separately opened after this one about the same but IMHO is a duplicate that could be closed.

XALANJ-2182 is an earlier issue which was incorrectly closed as duplicate of XALANJ-1978, which was wrong IMHO.
  
> Incorrect URL (systemId) handling : specials characters not decoded
> -------------------------------------------------------------------
>
>                 Key: XALANJ-2461
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2461
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.  Anybody can view the issue.) 
>          Components: transformation
>    Affects Versions: 2.7
>         Environment: Windows XP SP2, Sun JDK 1.6.0_01, Xalan 2.7.0
>            Reporter: Marc-Olivier PICOREAU
>
> I think there is a bug in class TransformerIdentityImpl, method createResultContentHandler.
> A file-URL is converted to a file simply by removing file:// or file:/ prefix.
> It works until we have URL-encoded specials characters like spaces converted to %20.
> String fileURL = sresult.getSystemId();
> [...]
> m_outputStream = new java.io.FileOutputStream(fileURL);
> I think the following solution would be great (already suggested in this issue : XALANJ-2182)
> String fileURL = sresult.getSystemId();
> File file = new File(new URI(fileURL));
> m_outputStream = new java.io.FileOutputStream(file);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Issue Comment Edited: (XALANJ-2461) Incorrect URL (systemId) handling : specials characters not decoded

Posted by "Michael Vorburger (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANJ-2461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865215#action_12865215 ] 

Michael Vorburger edited comment on XALANJ-2461 at 5/7/10 11:36 AM:
--------------------------------------------------------------------

This is really a pain, and causes never ending issues in apps using Xalan through e.g. Cocoon, when you have directories with spaces.

XALANJ-2511 has been separately opened after this one about the same but IMHO is a duplicate that could be closed.

XALANJ-2182 is an earlier issue which was incorrectly closed as duplicate of XALANJ-1978, which was wrong IMHO.

      was (Author: vorburger):
    This is is really a pain, and causes never ending issues in apps using Xalan through e.g. Cocoon, when you have directories with spaces.

XALANJ-2511 has been separately opened after this one about the same but IMHO is a duplicate that could be closed.

XALANJ-2182 is an earlier issue which was incorrectly closed as duplicate of XALANJ-1978, which was wrong IMHO.
  
> Incorrect URL (systemId) handling : specials characters not decoded
> -------------------------------------------------------------------
>
>                 Key: XALANJ-2461
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2461
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.  Anybody can view the issue.) 
>          Components: transformation
>    Affects Versions: 2.7
>         Environment: Windows XP SP2, Sun JDK 1.6.0_01, Xalan 2.7.0
>            Reporter: Marc-Olivier PICOREAU
>
> I think there is a bug in class TransformerIdentityImpl, method createResultContentHandler.
> A file-URL is converted to a file simply by removing file:// or file:/ prefix.
> It works until we have URL-encoded specials characters like spaces converted to %20.
> String fileURL = sresult.getSystemId();
> [...]
> m_outputStream = new java.io.FileOutputStream(fileURL);
> I think the following solution would be great (already suggested in this issue : XALANJ-2182)
> String fileURL = sresult.getSystemId();
> File file = new File(new URI(fileURL));
> m_outputStream = new java.io.FileOutputStream(file);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2461) Incorrect URL (systemId) handling : specials characters not decoded

Posted by "Michael Vorburger (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANJ-2461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865215#action_12865215 ] 

Michael Vorburger commented on XALANJ-2461:
-------------------------------------------

This is is really a pain, and causes never ending issues in apps using Xalan through e.g. Cocoon, when you have directories with spaces.

XALANJ-2511 has been separately opened after this one about the same but IMHO is a duplicate that could be closed.

XALANJ-2182 is an earlier issue which was incorrectly closed as duplicate of XALANJ-1978, which was wrong IMHO.

> Incorrect URL (systemId) handling : specials characters not decoded
> -------------------------------------------------------------------
>
>                 Key: XALANJ-2461
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2461
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.  Anybody can view the issue.) 
>          Components: transformation
>    Affects Versions: 2.7
>         Environment: Windows XP SP2, Sun JDK 1.6.0_01, Xalan 2.7.0
>            Reporter: Marc-Olivier PICOREAU
>
> I think there is a bug in class TransformerIdentityImpl, method createResultContentHandler.
> A file-URL is converted to a file simply by removing file:// or file:/ prefix.
> It works until we have URL-encoded specials characters like spaces converted to %20.
> String fileURL = sresult.getSystemId();
> [...]
> m_outputStream = new java.io.FileOutputStream(fileURL);
> I think the following solution would be great (already suggested in this issue : XALANJ-2182)
> String fileURL = sresult.getSystemId();
> File file = new File(new URI(fileURL));
> m_outputStream = new java.io.FileOutputStream(file);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org