wangwei 7 lat temu
rodzic
commit
f3366ba565

+ 1 - 2
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/AuthServiceImpl.java

@@ -2,7 +2,6 @@ package cn.com.qmth.examcloud.core.basic.service.impl;
 
 import java.util.Date;
 import java.util.List;
-import java.util.Locale;
 
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -268,7 +267,7 @@ public class AuthServiceImpl implements AuthService {
 		byte[] bytes = SHA256.encode(joinStr);
 		String hexAscii = ByteUtil.toHexAscii(bytes);
 
-		if (!hexAscii.toLowerCase(Locale.US).equals(token.toLowerCase(Locale.US))) {
+		if (!hexAscii.equalsIgnoreCase(token)) {
 			throw new StatusException("B-001204", "token校验失败");
 		}