|
@@ -25,7 +25,6 @@ import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
-import org.springframework.web.util.UriUtils;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.io.UnsupportedEncodingException;
|
|
@@ -153,18 +152,18 @@ public class OpenApiController {
|
|
if (Objects.isNull(signature) || Objects.equals(signature, "")) {
|
|
if (Objects.isNull(signature) || Objects.equals(signature, "")) {
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("鉴权信息不能为空");
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("鉴权信息不能为空");
|
|
}
|
|
}
|
|
- log.info("signature UriUtils before:{}", signature);
|
|
|
|
- signature = UriUtils.decode(signature, SystemConstant.CHARSET_NAME);
|
|
|
|
- log.info("signature UriUtils after:{}", signature);
|
|
|
|
|
|
+ log.info("signature URLDecoder before:{}", signature);
|
|
|
|
+ signature = URLDecoder.decode(signature, SystemConstant.CHARSET_NAME);
|
|
|
|
+ log.info("signature URLDecoder after:{}", signature);
|
|
if (Objects.isNull(account) || Objects.equals(account, "")) {
|
|
if (Objects.isNull(account) || Objects.equals(account, "")) {
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("工号不能为空");
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("工号不能为空");
|
|
}
|
|
}
|
|
- account = UriUtils.decode(account, SystemConstant.CHARSET_NAME);
|
|
|
|
|
|
+ account = URLDecoder.decode(account, SystemConstant.CHARSET_NAME);
|
|
|
|
|
|
BasicSchool basicSchool = AuthThirdUtil.hasPermissionCas(time, path, signature);
|
|
BasicSchool basicSchool = AuthThirdUtil.hasPermissionCas(time, path, signature);
|
|
OpenParams openParams = null;
|
|
OpenParams openParams = null;
|
|
if (Objects.nonNull(params) && !Objects.equals(params, "")) {
|
|
if (Objects.nonNull(params) && !Objects.equals(params, "")) {
|
|
- String decodeJson = UriUtils.decode(params, SystemConstant.CHARSET_NAME);
|
|
|
|
|
|
+ String decodeJson = URLDecoder.decode(params, SystemConstant.CHARSET_NAME);
|
|
openParams = JacksonUtil.readJson(decodeJson, OpenParams.class);
|
|
openParams = JacksonUtil.readJson(decodeJson, OpenParams.class);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -178,7 +177,7 @@ public class OpenApiController {
|
|
|
|
|
|
LoginResult loginResult = teachcloudCommonService.login(sysUser.getPassword(), sysUser, AppSourceEnum.CAS_THIRD);
|
|
LoginResult loginResult = teachcloudCommonService.login(sysUser.getPassword(), sysUser, AppSourceEnum.CAS_THIRD);
|
|
if (Objects.nonNull(returnUrl) && !Objects.equals(returnUrl, "")) {
|
|
if (Objects.nonNull(returnUrl) && !Objects.equals(returnUrl, "")) {
|
|
- returnUrl = UriUtils.decode(returnUrl, SystemConstant.CHARSET_NAME);
|
|
|
|
|
|
+ returnUrl = URLDecoder.decode(returnUrl, SystemConstant.CHARSET_NAME);
|
|
}
|
|
}
|
|
loginResult.setReturnUrl(returnUrl);
|
|
loginResult.setReturnUrl(returnUrl);
|
|
return ResultUtil.ok(loginResult);
|
|
return ResultUtil.ok(loginResult);
|