marwensaid / eid-applet

Automatically exported from code.google.com/p/eid-applet
Other
1 stars 1 forks source link

Signature processing of OOXML documents fails on Windows #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To reproduce the problem run JUnit tests on Windows.

OOXMLSignatureVerifier and OOXMLSignatureFacet use 
org.apache.commons.io.FilenameUtils.normalize() method to normalize URI of the 
reference. But it provides incorrect URI strings on Windows - slashes are 
converted to backslashes eg. "\word\document.xml". Method 
XMLSignatureFactory.newReference() than throws this exception:

java.lang.IllegalArgumentException: Illegal character in path at index 0: 
\word\document.xml?ContentType=application/xml

As a quick hack it is posible to fix URI like that:
partName = partName.replace('\\', '/');

But It would be better to find some other method that is not based on 
filesystem rules to normalize URI.

Versions: eid-applet-service-signer-1.0.4.Beta6-jdk16, 
eid-applet-service-signer-1.0.4.Beta7, eid-applet-service-signer-1.0.4.GA
OS: MS Windows 7 64-bit
JDK: 1.6.0_24 32-bit

Original issue reported on code.google.com by stepan.m...@seznam.cz on 20 Dec 2011 at 10:38

GoogleCodeExporter commented 9 years ago
Will be fixed in the next release.

Original comment by frank.co...@gmail.com on 23 Dec 2011 at 12:14

GoogleCodeExporter commented 9 years ago
Scheduled under 1.0.5.GA.

Original comment by frank.co...@gmail.com on 16 Jan 2012 at 8:05

GoogleCodeExporter commented 9 years ago

Original comment by frank.co...@gmail.com on 29 Jul 2013 at 11:19