From c5eb7458c8456664f1b3960401a0ce737824f3ea Mon Sep 17 00:00:00 2001
From: huyupeng <huyupeng@cndatacom.com>
Date: Mon, 01 Aug 2022 14:52:18 +0800
Subject: [PATCH] fix: 处理XSS攻击问题(#I5IRC8)
---
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java
index 913a891..e63d95e 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java
@@ -1,7 +1,7 @@
package com.ruoyi.common.core.constant;
/**
- * 缓存的key 常量
+ * 缓存常量信息
*
* @author ruoyi
*/
@@ -18,7 +18,37 @@
public final static long REFRESH_TIME = 120;
/**
+ * 密码最大错误次数
+ */
+ public final static int passwordMaxRetryCount = 5;
+
+ /**
+ * 密码锁定时间,默认10(分钟)
+ */
+ public final static long passwordLockTime = 10;
+
+ /**
* 权限缓存前缀
*/
public final static String LOGIN_TOKEN_KEY = "login_tokens:";
+
+ /**
+ * 验证码 redis key
+ */
+ public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
+
+ /**
+ * 参数管理 cache key
+ */
+ public static final String SYS_CONFIG_KEY = "sys_config:";
+
+ /**
+ * 字典管理 cache key
+ */
+ public static final String SYS_DICT_KEY = "sys_dict:";
+
+ /**
+ * 登录账户密码错误次数 redis key
+ */
+ public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
}
--
Gitblit v1.9.3