You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When truncating an MD5 hash to a specific number of chars, it is not validated if the number of chars is larger than the hash itself. Since we are using substring to truncate the hash, this will cause an IndexOutOfBoundsException. See substring documentation.
Reproducing this issue is fairly easy: just configure PDB property maxIdentifierSize to a value larger than 32.
If I have a little spare time I will submit a PR for this.
The text was updated successfully, but these errors were encountered:
Keep in mind that the thing that needs to be protected is the substring operation itself and not allowing more characters by default since it will fail on some database vendors that do not support more than 30 chars for example.
PDB already depends on commons-lang, so using org.apache.commons.lang.StringUtils#substring would solve the exception but wouldn't match the expectation of having a larger maxIdentifierSize.
When truncating an MD5 hash to a specific number of chars, it is not validated if the number of chars is larger than the hash itself. Since we are using
substring
to truncate the hash, this will cause anIndexOutOfBoundsException
. See substring documentation.Reproducing this issue is fairly easy: just configure PDB property
maxIdentifierSize
to a value larger than 32.If I have a little spare time I will submit a PR for this.
The text was updated successfully, but these errors were encountered: