mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix isBase64
This commit is contained in:
parent
74c6dca648
commit
0f96a95f2c
@ -22,6 +22,7 @@
|
|||||||
* 【core 】 Week增加of重载,支持DayOfWek(pr#1872@Github)
|
* 【core 】 Week增加of重载,支持DayOfWek(pr#1872@Github)
|
||||||
* 【poi 】 优化read,避免多次创建CopyOptions(issue#1875@Github)
|
* 【poi 】 优化read,避免多次创建CopyOptions(issue#1875@Github)
|
||||||
* 【core 】 优化CsvReader,实现可控遍历(pr#1873@Github)
|
* 【core 】 优化CsvReader,实现可控遍历(pr#1873@Github)
|
||||||
|
* 【core 】 优化Base64.isBase64判断(pr#1879@Github)
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【http 】 修复HttpCookie设置cookies的方法,不符合RFC6265规范问题(pr#418@Gitee)
|
* 【http 】 修复HttpCookie设置cookies的方法,不符合RFC6265规范问题(pr#418@Gitee)
|
||||||
|
@ -327,7 +327,7 @@ public class Base64 {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] bytes = StrUtil.utf8Bytes(base64);
|
final byte[] bytes = StrUtil.utf8Bytes(base64);
|
||||||
|
|
||||||
if (bytes.length != base64.length()) {
|
if (bytes.length != base64.length()) {
|
||||||
// 如果长度不相等,说明存在双字节字符,肯定不是Base64,直接返回false
|
// 如果长度不相等,说明存在双字节字符,肯定不是Base64,直接返回false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user