提交 1b9abf04 编写于 作者: S Serge Rider

Native tool log writer fix

上级 d544e6ae
......@@ -465,6 +465,7 @@ public abstract class AbstractNativeToolHandler<SETTINGS extends AbstractNativeT
logWriter.write(cmdString.toString());
logWriter.write("Task '" + task.getName() + "' started at " + new Date() + lf);
logWriter.flush();
InputStream in = input;
try (Reader reader = new InputStreamReader(in, GeneralUtils.getDefaultConsoleEncoding())) {
......@@ -494,6 +495,7 @@ public abstract class AbstractNativeToolHandler<SETTINGS extends AbstractNativeT
} finally {
try {
logWriter.write("Task '" + task.getName() + "' finished at " + new Date() + lf);
logWriter.flush();
} catch (IOException e) {
// ignore
}
......
......@@ -13,8 +13,8 @@ public abstract class NativeToolUtils {
public static boolean isSecureString(AbstractNativeToolSettings settings, String string) {
String userPassword = settings.getDataSourceContainer().getActualConnectionConfiguration().getUserPassword();
String toolUserPassword = settings.getToolUserPassword();
return !CommonUtils.isEmpty(toolUserPassword) && string.contains(toolUserPassword) ||
!CommonUtils.isEmpty(userPassword) && string.contains(userPassword);
return !CommonUtils.isEmpty(toolUserPassword) && string.endsWith(toolUserPassword) ||
!CommonUtils.isEmpty(userPassword) && string.endsWith(userPassword);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册