OldTruckDriver opened a new pull request, #438: URL: https://github.com/apache/commons-codec/pull/438
[CODEC-344] Validate Base64 custom alphabets Base64.Builder#setEncodeTable(byte...) accepted invalid custom alphabets. Duplicate entries could create a codec that failed to decode its own output, and alphabets containing the configured padding byte could make encoded data be interpreted as padding. This change validates custom Base64 encode tables, rejects duplicate entries, rejects tables containing the configured padding byte, and uses unsigned byte lookup so non-ASCII alphabet bytes can round-trip consistently. Tests cover duplicate entries, configured padding-byte conflicts, non-ASCII alphabet bytes, and the case where '=' is valid after changing the padding byte. Tests run: - mvn -q -Dtest=org.apache.commons.codec.binary.Base64Test test - mvn -q -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
