You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by "jballment (via GitHub)" <gi...@apache.org> on 2026/06/15 02:48:14 UTC

[I] [Bug]: Encr.encryptPasswordIfNotUsingVariables() does not check for Variable Resolver variables (hop)

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: issues-unsubscribe@hop.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug]: Encr.encryptPasswordIfNotUsingVariables() does not check for Variable Resolver variables (hop)

Posted by "jballment (via GitHub)" <gi...@apache.org>.
jballment commented on issue #7293:
URL: https://github.com/apache/hop/issues/7293#issuecomment-4704141999

   BTW the workaround is to save the Variable Resolver string as a Variable i.e.
   
   something.User = #{HashiCorp:something.key:Username}
   something.Password = #{HashiCorp:something.key:Password}
   
   And then use ${something.User} and ${something.Password} in the Action/Transform definition.


-- 
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: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug]: Encr.encryptPasswordIfNotUsingVariables() does not check for Variable Resolver variables (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva closed issue #7293: [Bug]: Encr.encryptPasswordIfNotUsingVariables() does not check for Variable Resolver variables
URL: https://github.com/apache/hop/issues/7293


-- 
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: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug]: Encr.encryptPasswordIfNotUsingVariables() does not check for Variable Resolver variables (hop)

Posted by "bamaer (via GitHub)" <gi...@apache.org>.
bamaer commented on issue #7293:
URL: https://github.com/apache/hop/issues/7293#issuecomment-4715633804

   .take-issue


-- 
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: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org