🔒 修复安全问题. 请求伪造 绕过验证码登录

This commit is contained in:
冷冷 committed 2019-05-08 21:44:58 +08:00
1 parent 6abc57e486
commit 96202dc7cd
2 files changed
+5 -7

No files matched your search

@@ -40,11 +40,6 @@ public interface CacheConstants {
*/
String ROUTE_KEY = "gateway_route_key";
/**
* 字典缓存
*/
String DICT_DETAILS = "dict_details";
/**
* 参数缓存
*/
@@ -121,8 +121,11 @@ public class ValidateCodeGatewayFilter extends AbstractGatewayFilterFactory {
}
String randomStr = request.getQueryParams().getFirst("randomStr");
if (StrUtil.isBlank(randomStr)) {
randomStr = request.getQueryParams().getFirst("mobile");
//https://gitee.com/log4j/pig/issues/IWA0D
String mobile = request.getQueryParams().getFirst("mobile");
if (StrUtil.isNotBlank(mobile)) {
randomStr = mobile;
}
String key = CommonConstants.DEFAULT_CODE_KEY + randomStr;