diff --git a/core/pom.xml b/core/pom.xml index a30412417a6..20ff092f992 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -12,7 +12,7 @@ 3.2.16.RELEASE - 0.12.0 + 1.1.0 3.0.4.Final 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; }