Selaa lähdekoodia

增加输出扩展名校验

欧阳劲驰 2 kuukautta sitten
vanhempi
commit
8d38d6bb72

+ 1 - 1
src/main/java/com/shkpr/service/alambizplugin/constants/ResponseCode.java

@@ -105,7 +105,7 @@ public enum ResponseCode {
     RESULT_THIRD_IMPORT_CANCEL_FAILED(40012, "Third import cancel failed."),
 
     RESULT_ASYNC_TASK_FAILED(40010, "Async task failed."),
-    RESULT_ASYNC_TASK_NOT_FOUND(40011, "Asyn task not found."),
+    RESULT_ASYNC_TASK_NOT_FOUND(40011, "Async task not found."),
     RESULT_ASYNC_TASK_CANCEL_FAILED(40012, "Async task cancel failed."),
 
     BUSINESS_SYNC_FUN_FAILED(65529,"The Synch operation failed."),

+ 2 - 1
src/main/java/com/shkpr/service/alambizplugin/controller/ApiGisSurveyController.java

@@ -525,7 +525,8 @@ public class ApiGisSurveyController {
         final String URI_PATH = request.getRequestURI();
         final String strPlatform = CommTool.getPlatformByAgent(strClientType, strUserAgent);
         final String strUserId = (String) request.getAttribute(TokenAuthenticationService.HEADER_USERID);
-        if (StringUtils.isAnyBlank(convertId) || StringUtils.length(convertId) > 64) {
+        if (StringUtils.isAnyBlank(convertId, outputExtension) || StringUtils.length(convertId) > 64
+                || StringUtils.length(outputExtension) > 64) {
             throw new SelfException(ResponseCode.STATUS_ERROR_PARAM_FORMAT.toStrCode()
                     , String.format(ApiURI.EXCEPTION_FORMAT
                     , strPlatform