You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Mikhail Ryagin (JIRA)" <ji...@apache.org> on 2018/09/20 10:14:00 UTC
[jira] [Updated] (SANTUARIO-494) Do not include carriage return
character (
or
) in base64-encoded fields in XML signature
[ https://issues.apache.org/jira/browse/SANTUARIO-494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Ryagin updated SANTUARIO-494:
-------------------------------------
Description:
In Santuario 2.1.0 there was a switch to use the java.util.Base64 Mime Encoder.
Unfortunately this encoder uses \r\n as end-of-line terminator.
So resulting XML includes escaped \r character (encoded as \
 or \ ), for example:
<ds:DigestValue>jFHKh16UIYL+MslahIe06VpUW+Q9uyC/9vvsKiYHalqMwsyN7PChFbeMn0Cg+AAAeJqTgBYdVS+R\
vpef7TWwJA==</ds:DigestValue>
Apart from being non-pretty it imposes problems in some use cases, for example see [https://issues.jboss.org/browse/WFLY-9892]
It's better to use \n as end-of-line terminator.
Attaching a patch for this issue.
was:
In Santuario 2.1.0 there was a switch to use the java.util.Base64 Mime Encoder.
Unfortunately this encoder uses \r\n as end-of-line terminator.
So resulting XML includes escaped \r character (encoded as 
 or ), for example:
<ds:DigestValue>jFHKh16UIYL+MslahIe06VpUW+Q9uyC/9vvsKiYHalqMwsyN7PChFbeMn0Cg+AAAeJqTgBYdVS+R
vpef7TWwJA==</ds:DigestValue>
Apart from being non-pretty it imposes problems in some use cases, for example see [https://issues.jboss.org/browse/WFLY-9892]
It's better to use \n as end-of-line terminator.
Attaching a patch for this issue.
> Do not include carriage return character (
 or ) in base64-encoded fields in XML signature
> ---------------------------------------------------------------------------------------------------
>
> Key: SANTUARIO-494
> URL: https://issues.apache.org/jira/browse/SANTUARIO-494
> Project: Santuario
> Issue Type: Improvement
> Components: Java
> Affects Versions: Java 2.1.2
> Reporter: Mikhail Ryagin
> Assignee: Colm O hEigeartaigh
> Priority: Major
> Attachments: base64-no-carriage-return.patch
>
>
> In Santuario 2.1.0 there was a switch to use the java.util.Base64 Mime Encoder.
> Unfortunately this encoder uses \r\n as end-of-line terminator.
> So resulting XML includes escaped \r character (encoded as \
 or \ ), for example:
> <ds:DigestValue>jFHKh16UIYL+MslahIe06VpUW+Q9uyC/9vvsKiYHalqMwsyN7PChFbeMn0Cg+AAAeJqTgBYdVS+R\
> vpef7TWwJA==</ds:DigestValue>
> Apart from being non-pretty it imposes problems in some use cases, for example see [https://issues.jboss.org/browse/WFLY-9892]
> It's better to use \n as end-of-line terminator.
> Attaching a patch for this issue.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)