@iflyrpa/actions 4.0.0-beta.10 → 4.0.0-beta.12
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/dist/bundle.js +15 -4
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -5434,7 +5434,7 @@ function __webpack_require__(moduleId) {
|
|
|
5434
5434
|
return module;
|
|
5435
5435
|
};
|
|
5436
5436
|
})();
|
|
5437
|
-
var package_namespaceObject = JSON.parse('{"i8":"4.0.0-beta.
|
|
5437
|
+
var package_namespaceObject = JSON.parse('{"i8":"4.0.0-beta.11"}');
|
|
5438
5438
|
var dist = __webpack_require__("../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js");
|
|
5439
5439
|
async function ProxyAgent(task, ip, adr, accountId, refresh) {
|
|
5440
5440
|
const http = new Http({
|
|
@@ -14523,8 +14523,19 @@ const mock_mockAction = async (task, params)=>{
|
|
|
14523
14523
|
task.logger.error(`解析 webProtectData 失败: ${error}`);
|
|
14524
14524
|
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.response)(414, "安全参数 webProtectData 解析失败,请重新获取后重试", "");
|
|
14525
14525
|
}
|
|
14526
|
-
|
|
14527
|
-
|
|
14526
|
+
let ticket = webProtectData.ticket;
|
|
14527
|
+
let ts_sign = webProtectData.ts_sign;
|
|
14528
|
+
const serverDataCookie = params.cookies.find((it)=>"bd_ticket_guard_server_data" === it.name)?.value;
|
|
14529
|
+
if (serverDataCookie) try {
|
|
14530
|
+
const decoded = JSON.parse(Buffer.from(decodeURIComponent(serverDataCookie), "base64").toString("utf8"));
|
|
14531
|
+
if (decoded.ticket && decoded.ts_sign) {
|
|
14532
|
+
if (decoded.ticket !== ticket) task.logger.info("使用 cookie 中的最新 ticket(web_protect 已过期)");
|
|
14533
|
+
ticket = decoded.ticket;
|
|
14534
|
+
ts_sign = decoded.ts_sign;
|
|
14535
|
+
}
|
|
14536
|
+
} catch (error) {
|
|
14537
|
+
task.logger.warn(`解析 bd_ticket_guard_server_data 失败,回退到 web_protect: ${error}`);
|
|
14538
|
+
}
|
|
14528
14539
|
let ec_privateKey;
|
|
14529
14540
|
try {
|
|
14530
14541
|
ec_privateKey = JSON.parse(JSON.parse(params.extraParam["security-sdk/s_sdk_crypt_sdk"] || "{}").data || "{}").ec_privateKey;
|