Browse Source

网管兼容原有st是否加密。添加学生平板主界面白名单

tags/正式3.13.2
王宁 1 year ago
parent
commit
fc554dbc99

+ 8
- 2
gateway/src/main/java/com/xhkjedu/gateway/interceptors/DecryptRequestionBodyFilter.java View File

@@ -64,7 +64,6 @@ public class DecryptRequestionBodyFilter extends JedisUtil implements GlobalFilt
64 64
         ServerHttpResponse response = exchange.getResponse();
65 65
         String path = request.getURI().getPath(); // 当前调用方法的url
66 66
         HttpHeaders headers = request.getHeaders();
67
-//        log.info("HttpMethod:{},Url:{}", request.getMethod(), request.getURI().getRawPath());
68 67
         String st = "Xh-St";
69 68
         response.getHeaders().add(st, this.xhSt);
70 69
         response.getHeaders().add("Access-Control-Expose-Headers", st);
@@ -74,8 +73,15 @@ public class DecryptRequestionBodyFilter extends JedisUtil implements GlobalFilt
74 73
         if (!rtn && !xhSt.equals(decrypt)) {//非白名单接口验证加密方式
75 74
             throw new GatewayException(1, "验证失败,请刷新重试");
76 75
         }
76
+
77
+        if(!isListNotEmpty(decrypts)){
78
+            //兼容之前版本,验证st的值进行加解密
79
+            List<String> oldDecrypts = headers.get("st");
80
+            decrypt = isListNotEmpty(oldDecrypts)?oldDecrypts.get(0):"false";
81
+        }
82
+
77 83
         Mono<Void> voidMono;
78
-        if (!"true".equals(decrypt)) {
84
+        if ("false".equals(decrypt)) {
79 85
             //白名单中的接口
80 86
             voidMono = returnMononew(chain, exchange);
81 87
         }else{

+ 5
- 3
gateway/src/main/resources/application.properties View File

@@ -117,12 +117,14 @@ redismoduletime=300
117 117
 
118 118
 
119 119
 #白名单接口
120
-whitelistAPI=user/login,/class_student/stu_class,/user/detail,/status/info,/user/qrg,/user/check_user\
120
+whitelistAPI=user/login,user/loginstu,/class_student/stu_class,/user/detail,/status/info,/user/qrg,/user/check_user\
121 121
   ,/user/update_code,/user/update_pwd_byCode,/user/list_usecret,/user/check_usecret,/user/reset_pwd\
122 122
   ,/class_student/import_user,/user/import_teacher\
123 123
   ,/get_new,/stype/list,/cloud/detail,/auser/import,/pdf,/epsb/import,\
124
-  ,/section/get_zjr,/csw/add,/xz/import,/agora_token/rtc_token,/epqt/pqs,/eb/get_mn,/scan/save,/eps/sca,/eps/scaer
124
+  ,/section/get_zjr,/csw/add,/xz/import,/agora_token/rtc_token,/epqt/pqs,/eb/get_mn,/scan/save,/eps/sca,/eps/scaer\
125
+  ,module/treelst,std/td_num,user/check_login
126
+
125 127
 
126 128
 #版本号
127 129
 buildnum=300
128
-versionname=Test_v3.13.0
130
+versionname=Test_v3.13.2

+ 1
- 1
sapi/src/main/resources/application.properties View File

@@ -103,4 +103,4 @@ ipregiondb=D:\\school\\ip2region.xdb
103 103
 
104 104
 #版本号
105 105
 buildnum=300
106
-versionname=Test_v3.13.0
106
+versionname=Test_v3.13.2

+ 1
- 1
suser/src/main/resources/application.properties View File

@@ -96,4 +96,4 @@ loginerrornum=3
96 96
 
97 97
 #版本号
98 98
 buildnum=300
99
-versionname=Test_v3.13.0
99
+versionname=Test_v3.13.2

Loading…
Cancel
Save