Just to follow up on this, after some offline discussion with Sean, I
realised that the simplest way of handling this is just to not emit newline
characters in BASE-64 encoded content if the system property
"org.apache.xml.security.ignoreLineBreaks" is set to true. That is what
versions of Santuario prior to 2.1.0 did.

Colm.

On Wed, Mar 28, 2018 at 5:06 PM, Colm O hEigeartaigh <cohei...@apache.org>
wrote:

> Hi all,
>
> I'd appreciate some feedback on the patch I submitted here:
>
> https://issues.apache.org/jira/browse/SANTUARIO-482
>
> The problem is that prior to Santuario 2.1.0, our Base64 implementation
> did not add line breaks. From Santuario 2.1.0, we use the JDK's Base64 Mime
> implementation, which is correct as per the spec.
>
> However, these line breaks are causing some problems for a few people. So
> I added a new system property called 
> "org.apache.xml.security.ignoreMimeEncoder"
> which uses the old behaviour of not adding in line breaks if set to true.
>
> The question is whether we should ignore line breaks by default or not? If
> we change back to ignoring line breaks by default it changes the behaviour
> in the 2.1.0/2.1.1 releases, which makes me a bit uncomfortable.
>
> Colm.
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to