Skip to content

Commit

Permalink
fix: DDM signon with passwords greater than 10 chars
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Gorzinski <[email protected]>
  • Loading branch information
ThePrez committed Jan 17, 2024
1 parent 003183e commit 2699b28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/ibm/as400/access/SignonConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static byte[] charArrayToByteArray(char[] chars) throws AS400SecurityException

static byte[] charArrayToByteArray(char[] sourceChars, boolean upperCase, String encoding) throws AS400SecurityException
{
String padded = (new String(sourceChars) + " ").substring(0, 10);
String padded = sourceChars.length < 10 ? (new String(sourceChars) + " ").substring(0, 10) : new String(sourceChars);
if(upperCase) padded = padded.toUpperCase();
try {
return padded.getBytes(encoding);
Expand Down

0 comments on commit 2699b28

Please sign in to comment.