From f9fb24365702e3e8c4135446babd6d99678e884d Mon Sep 17 00:00:00 2001 From: Jeroen Jansen van Rosendaal Date: Tue, 7 Feb 2017 13:57:03 +0100 Subject: [PATCH 1/2] Update MessageSendingPipe.java --- .../pipes/MessageSendingPipe.java | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/core/src/main/java/nl/nn/adapterframework/pipes/MessageSendingPipe.java b/core/src/main/java/nl/nn/adapterframework/pipes/MessageSendingPipe.java index 65fbe664710..5bafc6f60c1 100644 --- a/core/src/main/java/nl/nn/adapterframework/pipes/MessageSendingPipe.java +++ b/core/src/main/java/nl/nn/adapterframework/pipes/MessageSendingPipe.java @@ -109,7 +109,6 @@ * {@link #setCorrelationIDStyleSheet(String) correlationIDStyleSheet}stylesheet to extract correlationID from message  * {@link #setCorrelationIDSessionKey(String) correlationIDSessionKey}Key of a PipeLineSession-variable. Is specified, the value of the PipeLineSession variable is used as input for the XpathExpression or StyleSheet, instead of the current input message  * {@link #setHideRegex(String) hideRegex}Regular expression to mask strings in the error/logstore. Everything character between to strings in this expression will be replaced by a '*'that fits the expression is replaced. For Example, the regular expression (?<=<Party>).*?(?=</Party>) will replace every character between keys and   - * {@link #setHideMethod(String) hideMethod}(only used when hideRegex is not empty) either all or firstHalf. When firstHalf only the first half of the string is masked, otherwise (all) the entire string is masked"all" * {@link #setLabelXPath(String) labelXPath}xpath expression to extract label from message  * {@link #setLabelNamespaceDefs(String) labelNamespaceDefs}namespace defintions for labelXPath. Must be in the form of a comma or space separated list of prefix=namespaceuri-definitions  * {@link #setLabelStyleSheet(String) labelStyleSheet}stylesheet to extract label from message  @@ -228,7 +227,6 @@ public class MessageSendingPipe extends FixedForwardPipe implements HasSender, H private ListenerProcessor listenerProcessor; private String hideRegex = null; - private String hideMethod = "all"; private boolean streamResultToServlet=false; @@ -581,21 +579,13 @@ public PipeRunResult doPipe(Object input, IPipeLineSession session) throws PipeR if (sender instanceof MailSender) { String messageInMailSafeForm = (String)session.get("messageInMailSafeForm"); if (hideRegex != null){ - if (getHideMethod().equalsIgnoreCase("FIRSTHALF")) { - messageInMailSafeForm = Misc.hideFirstHalf(messageInMailSafeForm, hideRegex); - } else { - messageInMailSafeForm = Misc.hideAll(messageInMailSafeForm, hideRegex); - } + messageInMailSafeForm = messageInMailSafeForm.replaceAll(hideRegex,"$1**********$2"); } messageLog.storeMessage(storedMessageID,correlationID,new Date(),messageTrail,label,messageInMailSafeForm); } else { String message = (String)input; if (hideRegex != null){ - if (getHideMethod().equalsIgnoreCase("FIRSTHALF")) { - message = Misc.hideFirstHalf(message, hideRegex); - } else { - message = Misc.hideAll(message, hideRegex); - } + message = message.replaceAll(hideRegex,"$1**********$2"); } messageLog.storeMessage(storedMessageID,correlationID,new Date(),messageTrail,label,message); } @@ -1131,14 +1121,6 @@ public String getHideRegex() { return hideRegex; } - public void setHideMethod(String hideMethod) { - this.hideMethod = hideMethod; - } - - public String getHideMethod() { - return hideMethod; - } - public void setStreamResultToServlet(boolean b) { streamResultToServlet = b; } From 92f4b0c2f03e4650f39d063060411653f0879db3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 17 Jun 2021 04:37:54 +0000 Subject: [PATCH 2/2] [Security] Bump xmlbeans from 2.6.0 to 3.0.0 Bumps xmlbeans from 2.6.0 to 3.0.0. **This update includes a security fix.** Signed-off-by: dependabot-preview[bot] --- core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index a30412417a6..f0d0c9972d1 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -320,7 +320,7 @@ org.apache.xmlbeans xmlbeans - 2.6.0 + 3.0.0 cglib