From 1aa2bba1ccdc1145d2d33f6032fa57a3912a2d80 Mon Sep 17 00:00:00 2001 From: Dean DiRoma Date: Wed, 6 Mar 2024 09:23:52 -0500 Subject: [PATCH] [BACKLOG-40130] Import/Export utility - user creds are not being suppressed in the correct way - reverting https://github.com/pentaho/pentaho-platform/pull/5499/commits/247e2b82609e97eb161e7a80ef136fadf7d61daa --- .../tomcat/logvalve/FilteredAccessLogValve.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tomcat-logs/src/main/java/org/pentaho/tomcat/logvalve/FilteredAccessLogValve.java b/tomcat-logs/src/main/java/org/pentaho/tomcat/logvalve/FilteredAccessLogValve.java index 647243f689b..6810786f70d 100644 --- a/tomcat-logs/src/main/java/org/pentaho/tomcat/logvalve/FilteredAccessLogValve.java +++ b/tomcat-logs/src/main/java/org/pentaho/tomcat/logvalve/FilteredAccessLogValve.java @@ -35,15 +35,7 @@ public class FilteredAccessLogValve extends AccessLogValve { public void log( CharArrayWriter message ) { try ( CharArrayWriter caw = new CharArrayWriter() ) { // Mask the user password - String tempString = message.toString(); - if ( tempString.contains( "/pentaho/api/csrf" ) || tempString.contains( "/pentaho/api/repo/files/backup" ) ) { - tempString = tempString.replaceAll( "\\?userid[^&]+%26", "" ); - tempString = tempString.replaceAll( "\\?userid[^&]+", "" ); - tempString = tempString.replaceAll( "password[^&]+%26", "" ); - tempString = tempString.replaceAll( "\\&password[^&]+", "" ); - } - tempString = tempString.replaceAll( "j_password=[^&^ ]*", "j_password=***" ); - caw.write( tempString ); + caw.write( message.toString().replaceAll( "j_password=[^&^ ]*", "j_password=***" ) ); super.log( caw ); } catch ( IOException e ) { e.printStackTrace();