wangwei 6 жил өмнө
parent
commit
be32ec3b26

+ 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");