wangwei 6 년 전
부모
커밋
be32ec3b26
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/FaceServiceImpl.java

+ 3 - 0
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/FaceServiceImpl.java

@@ -75,6 +75,9 @@ public class FaceServiceImpl implements FaceService {
 		if (StringUtils.isBlank(photoName)) {
 			throw new StatusException("B-680006", "photoName is null");
 		}
+		if (!photoName.matches("\\w+\\.\\w+")) {
+			throw new StatusException("B-680006", "photoName is wrong");
+		}
 
 		if (StringUtils.isBlank(photoName)) {
 			throw new StatusException("B-680007", "photoName is null");