[#2738]Put ParamUtils into origin place for tenant legality verification.

This commit is contained in:
zongtanghu 2020-05-11 15:57:53 +08:00
parent 0305c0d01f
commit b7207cbe73
2 changed files with 8 additions and 0 deletions

View File

@ -15,8 +15,12 @@
*/
package com.alibaba.nacos.config.server.controller;
<<<<<<< HEAD
import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.common.model.RestResult;
=======
import com.alibaba.nacos.config.server.utils.ParamUtils;
>>>>>>> [#2738]Put ParamUtils into origin place for tenant legality verification.
import com.alibaba.nacos.config.server.auth.ConfigResourceParser;
import com.alibaba.nacos.config.server.constant.Constants;
import com.alibaba.nacos.config.server.controller.parameters.SameNamespaceCloneConfigBean;

View File

@ -71,7 +71,11 @@ public class ParamUtils {
} else if (StringUtils.isBlank(datumId) || !isValid(datumId)) {
throw new NacosException(NacosException.INVALID_PARAM, "invalid datumId : " + datumId);
} else if (StringUtils.isBlank(content)) {
<<<<<<< HEAD:config/src/main/java/com/alibaba/nacos/config/server/utils/ParamUtils.java
throw new NacosException(NacosException.INVALID_PARAM, "content is blank : " + content);
=======
throw new NacosException(NacosException.INVALID_PARAM, "content is blank");
>>>>>>> [#2738]Put ParamUtils into origin place for tenant legality verification.:config/src/main/java/com/alibaba/nacos/config/server/utils/ParamUtils.java
} else if (content.length() > PropertyUtil.getMaxContent()) {
throw new NacosException(NacosException.INVALID_PARAM,
"invalid content, over " + PropertyUtil.getMaxContent());