cgserver 12.3.1 → 12.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/lib/Framework/Database/Mongo/MongoManager.js +1 -0
- package/dist/lib/Framework/Server/WebServer/Controller/MongoBaseUserController.js +1 -1
- package/dist/lib/Framework/Server/WebServer/Controller/MysqlBaseUserController.js +1 -1
- package/dist/lib/Framework/Server/WebServer/Engine/Request.js +1 -5
- package/dist/lib/Framework/ThirdParty/AlipayTool.js +2 -2
- package/dist/types/Framework/Database/Redis/RedisManager.d.ts +2295 -4
- package/dist/types/Framework/ThirdParty/AlipayTool.d.ts +32 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ class MongoBaseUserController extends BaseController_1.BaseController {
|
|
|
75
75
|
return user;
|
|
76
76
|
}
|
|
77
77
|
if (this._engine.cfg.session_type == FrameworkConfig_1.ESessionType.Redis) {
|
|
78
|
-
let user_id =
|
|
78
|
+
let user_id = +(await RedisManager_1.gRedisMgr.redis.get(this._session_id)).toString();
|
|
79
79
|
if (user_id > 0) {
|
|
80
80
|
user = (await this._userser.getById(user_id));
|
|
81
81
|
}
|
|
@@ -73,7 +73,7 @@ class MysqlBaseUserController extends BaseController_1.BaseController {
|
|
|
73
73
|
return user;
|
|
74
74
|
}
|
|
75
75
|
if (this._engine.cfg.session_type == FrameworkConfig_1.ESessionType.Redis) {
|
|
76
|
-
let user_id =
|
|
76
|
+
let user_id = +(await RedisManager_1.gRedisMgr.redis.get(this._session_id)).toString();
|
|
77
77
|
if (user_id > 0) {
|
|
78
78
|
user = (await MysqlUserService_1.GUserSer.getById(user_id));
|
|
79
79
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Request = void 0;
|
|
4
|
-
const url_1 = require("url");
|
|
5
4
|
const Core_1 = require("../../../Core/Core");
|
|
6
5
|
const Log_1 = require("../../../Logic/Log");
|
|
7
6
|
class Request {
|
|
@@ -159,10 +158,7 @@ class Request {
|
|
|
159
158
|
}
|
|
160
159
|
let quote_index = path.indexOf("?");
|
|
161
160
|
if (quote_index >= 0) {
|
|
162
|
-
|
|
163
|
-
url.searchParams.forEach((value, name, searchParams) => {
|
|
164
|
-
this._params[name] = value;
|
|
165
|
-
});
|
|
161
|
+
this._params = this._req.query || {};
|
|
166
162
|
path = path.substring(0, quote_index);
|
|
167
163
|
}
|
|
168
164
|
let params = path.split("/");
|
|
@@ -53,13 +53,13 @@ class AlipayTool {
|
|
|
53
53
|
* @param notifyData 回调数据
|
|
54
54
|
* @returns 验证结果
|
|
55
55
|
*/
|
|
56
|
-
async verifyNotify(notifyData) {
|
|
56
|
+
async verifyNotify(notifyData, raw) {
|
|
57
57
|
try {
|
|
58
58
|
if (!this._alipaySdk) {
|
|
59
59
|
return false;
|
|
60
60
|
}
|
|
61
61
|
// 验证签名
|
|
62
|
-
const signValid = await this._alipaySdk.checkNotifySign(notifyData);
|
|
62
|
+
const signValid = await this._alipaySdk.checkNotifySign(notifyData, raw);
|
|
63
63
|
if (!signValid) {
|
|
64
64
|
Log_1.gLog.error({ tip: '支付宝回调签名验证失败' });
|
|
65
65
|
return false;
|