Invalid XML Exception

Paul Hethmon paul.hethmon at clareitysecurity.com
Mon Apr 11 13:05:54 EDT 2016


The bug is on the generating side, it’s not putting the proper padding on the encoded string.

I think I can make a case that the XML Tooling code should throw an error here or take the Apache approach and assume the padding. Given this is with a v2 system, there is no fix to be made there, not sure if v3 is essentially the same code.

> On Apr 11, 2016, at 12:46 PM, Paul Hethmon <paul.hethmon at clareitysecurity.com> wrote:
> 
> It’s a problem with the Base64 decoding. Using Apache Commons I get valid XML, using XMLTooling, I lose the final closing greater than symbol.
> 
> Here’s a Base64 string that has that behavior:
> 
> PHNhbWxwOkF1dGhuUmVxdWVzdCBJRD0iX0JEMjEwQzU1LTZCQTYtNEFBMC1CQTIzLTNEMDU5RTE2MTQ0NSIgVmVyc2lvbj0iMi4wIiBJc3N1ZUluc3RhbnQ9IjIwMTYtMDQtMTFUMTY6MzM6MDhaIiBEZXN0aW5hdGlvbj0iaHR0cHM6Ly9pZHAubm5ybWxzLnNhZmVtbHMubmV0L2lkcC9wcm9maWxlL1NBTUwyL1BPU1QvU1NPIiBGb3JjZUF1dGhuPSJmYWxzZSIgSXNQYXNzaXZlPSJmYWxzZSIgeG1sbnM6c2FtbHA9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpwcm90b2NvbCI+PHNhbWw6SXNzdWVyIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iPmh0dHA6Ly93d3cubWxzRU5zaWdodC5jb20vZ2VvamV0Ni88L3NhbWw6SXNzdWVyPjwvc2FtbHA6QXV0aG5SZXF1ZXN0Pg
> 
> Now to figure out which side the bug is on.
> 

-----
Paul Hethmon
Chief Software Architect
paul.hethmon at clareitysecurity.com




More information about the users mailing list