!727 修复isBase64判断不准确的问题

Merge pull request !727 from uyong/v5-dev
This commit is contained in:
Looly
2022-07-29 13:55:37 +00:00
committed by Gitee

View File

@@ -352,6 +352,9 @@ public class Base64 {
* @since 5.7.5
*/
public static boolean isBase64(byte[] base64Bytes) {
if (base64Bytes == null || base64Bytes.length < 3) {
return false;
}
boolean hasPadding = false;
for (byte base64Byte : base64Bytes) {
if (hasPadding) {