mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix: 校验字体文件名称后缀:.ttf 或 .TTF
This commit is contained in:
@@ -155,7 +155,7 @@ public class FontManage {
|
||||
FontDto fontDto = new FontDto();
|
||||
try {
|
||||
String filename = file.getOriginalFilename();
|
||||
if (StringUtils.isEmpty(filename) || !filename.endsWith(".ttf")) {
|
||||
if (StringUtils.isEmpty(filename) || !filename.toLowerCase().endsWith(".ttf")) {
|
||||
DEException.throwException("非法格式的文件!");
|
||||
}
|
||||
String suffix = filename.substring(filename.lastIndexOf(".") + 1);
|
||||
|
||||
Reference in New Issue
Block a user