Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DDM signon with passwords greater than 10 chars #152

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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