Payara icon indicating copy to clipboard operation
Payara copied to clipboard

Bug Report: create-password-alias --passwordfile includes trailing whitespace

Open mkarg opened this issue 2 years ago • 0 comments

Description


In case the used password file contains trailing whitespace, it is getting included as part of the password value.

This is rather unexpected and not documented anywhere.

Expected Outcome

Any trailing whitespace is expected to be excluded from the password value.

Current Outcome

Any trailing whitespace is included in the password value.

Steps to reproduce

echo "AS_ADMIN_ALIASPASSWORD=foo   " > x
asadmin create-password-alias --passwordfile x Y

Let an arbitrary component consume a custom property set to ${ALIAS=Y} and print the length of the value into the log.

The expected result is 3, but it will be 6.

Environment

  • Distribution: Server Full Profile
  • JDK Version: 11 - Zulu
  • Operating System: Any

mkarg avatar Aug 10 '22 09:08 mkarg