Skip to content

Commit 213a926

Browse files
committed
CAMEL-10869: Mask password in trace logging.
1 parent 8dddc4f commit 213a926

File tree

1 file changed

+3
-3
lines changed
  • components/camel-ftp/src/main/java/org/apache/camel/component/file/remote

1 file changed

+3
-3
lines changed

components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public boolean connect(RemoteFileConfiguration configuration) throws GenericFile
144144
if (endpoint instanceof FtpEndpoint) {
145145
FtpEndpoint<?> ftpEndpoint = (FtpEndpoint<?>) endpoint;
146146
if (ftpEndpoint.getSoTimeout() > 0) {
147-
log.trace("Using SoTimeout=" + ftpEndpoint.getSoTimeout());
147+
log.trace("Using SoTimeout={}", ftpEndpoint.getSoTimeout());
148148
try {
149149
client.setSoTimeout(ftpEndpoint.getSoTimeout());
150150
} catch (IOException e) {
@@ -157,10 +157,10 @@ public boolean connect(RemoteFileConfiguration configuration) throws GenericFile
157157
boolean login;
158158
if (username != null) {
159159
if (account != null) {
160-
log.trace("Attempting to login user: {} using password: {} and account: {}", new Object[]{username, configuration.getPassword(), account});
160+
log.trace("Attempting to login user: {} using password: ******** and account: {}", new Object[]{username, account});
161161
login = client.login(username, configuration.getPassword(), account);
162162
} else {
163-
log.trace("Attempting to login user: {} using password: {}", username, configuration.getPassword());
163+
log.trace("Attempting to login user: {} using password: ********", username);
164164
login = client.login(username, configuration.getPassword());
165165
}
166166
} else {

0 commit comments

Comments
 (0)