jballment opened a new issue, #7293:
URL: https://github.com/apache/hop/issues/7293
### Apache Hop version?
2.16.0
### Java version?
OpenJDK Runtime Environment (build 17+35-2724)
### Operating system
Windows
### What happened?
Dialogs that using Encr.encryptPasswordIfNotUsingVariables() to save
password fields, encrypt values that are referring to a Variable Resolver
rather than storing them unencrypted.
The issue is that Encr.encryptPasswordIfNotUsingVariables() calls
StringUtil.getUsedVariables() to test for variables however currently only
tests for Windows (%%) and Linux (${}) style variables:
public static void getUsedVariables(
String aString, List<String> list, boolean includeSystemVariables) {
getUsedVariables(aString, UNIX_OPEN, UNIX_CLOSE, list,
includeSystemVariables);
getUsedVariables(aString, WINDOWS_OPEN, WINDOWS_CLOSE, list,
includeSystemVariables);
}
Whereas the Variable Resolver has a format of #{} which isn't recognised. A
simple fix will be to add a check for Variable Resolver as follows:
public static void getUsedVariables(
String aString, List<String> list, boolean includeSystemVariables) {
getUsedVariables(aString, UNIX_OPEN, UNIX_CLOSE, list,
includeSystemVariables);
getUsedVariables(aString, WINDOWS_OPEN, WINDOWS_CLOSE, list,
includeSystemVariables);
getUsedVariables(aString, RESOLVER_OPEN, RESOLVER_CLOSE, list,
includeSystemVariables);
}
### Issue Priority
Priority: 3
### Issue Component
Component: Hop Config
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]