You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Alexey Ermakov (JIRA)" <ji...@apache.org> on 2009/01/20 21:28:59 UTC
[jira] Updated: (IVY-1010) XmlModuleDescriptorUpdater is a mess
that produces broken xmls in many cases
[ https://issues.apache.org/jira/browse/IVY-1010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Ermakov updated IVY-1010:
--------------------------------
Description:
There are many severe issues with charsets and xml processing in general in XmlModuleDescriptorUpdater#copyHeader() and the rest of XmlModuleDescriptorUpdater.
Namely, you 1) don't check for byte-order mark presence, 2) don't perform the XML encoding guessing as per XML spec, 3) open ivy.xml in platform-default encoding, 4) write your own XML serializer that doesn't even do output escaping for character data.
I recommend you to send one of your programmers to an XML 101 course and rewrite this mess using standard XML apis, such as DOM or StAX.
To reproduce parts 1)-3), try resolving and publishing a module with ivy.xml in UTF-16LE (with BOM).
was:
There are many severe issues with charsets and xml processing in general in XmlModuleDescriptorUpdater#copyHeader() and the rest of XmlModuleDescriptorUpdater.
Namely, you 1) don't check for byte-order mark presence, 2) don't perform the XML encoding guessing processed as per XML spec, 3) open ivy.xml in platform-default encoding, 4) write your own XML serializer that doesn't even do output escaping for character data.
I recommend you to send one of your programmers to an XML 101 course and rewrite this mess using standard XML apis, such as DOM or StAX.
To reproduce parts 1)-3), try resolving and publishing a module with ivy.xml in UTF-16LE (with BOM).
> XmlModuleDescriptorUpdater is a mess that produces broken xmls in many cases
> ----------------------------------------------------------------------------
>
> Key: IVY-1010
> URL: https://issues.apache.org/jira/browse/IVY-1010
> Project: Ivy
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0-RC2
> Reporter: Alexey Ermakov
>
> There are many severe issues with charsets and xml processing in general in XmlModuleDescriptorUpdater#copyHeader() and the rest of XmlModuleDescriptorUpdater.
> Namely, you 1) don't check for byte-order mark presence, 2) don't perform the XML encoding guessing as per XML spec, 3) open ivy.xml in platform-default encoding, 4) write your own XML serializer that doesn't even do output escaping for character data.
> I recommend you to send one of your programmers to an XML 101 course and rewrite this mess using standard XML apis, such as DOM or StAX.
> To reproduce parts 1)-3), try resolving and publishing a module with ivy.xml in UTF-16LE (with BOM).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.