Skip to content

Commit 5dbf1cf

Browse files
committed
update
1 parent 2907a5e commit 5dbf1cf

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# version 2.19.15
2+
3+
- 修改登录错误 invalid password? 提示
4+
- 要是用浏览器在力扣官网登录账号还没过期, 插件的登录会被拒绝,使得登录失败,看起来是官方的机制?(在浏览器上把账号退出,应该就能登录了)
5+
16
# version 2.19.14
27

38
- 在 ID 含有空格的题目对应的文件中,点击 Description 按钮时,无法识别题目 ID

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-leetcode-problem-rating",
33
"displayName": "LeetCode",
44
"description": "%main.description%",
5-
"version": "2.19.14",
5+
"version": "2.19.15",
66
"author": "ccagml",
77
"publisher": "ccagml",
88
"license": "MIT",

src/rpc/actionChain/chainNode/leetcode.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,17 @@ and csrf token to the user object and saves the user object to the session. */
438438
// eslint-disable-next-line @typescript-eslint/no-unused-vars
439439
request.post(opts, function (e: any, resp: any, _) {
440440
if (e) return cb(e);
441-
if (resp.statusCode !== 302) return cb("invalid password?");
441+
if (resp.statusCode !== 302) {
442+
let _temp_msg = JSON.stringify({
443+
statusCode: resp.statusCode,
444+
body: resp.body,
445+
statusMessage: resp.statusMessage,
446+
msg: "密码错误?",
447+
msg1: "invalid password?",
448+
msg2: "要是用浏览器在力扣官网登录过账号还没过期, 插件的登录会被拒绝,使得登录失败",
449+
});
450+
return cb(_temp_msg);
451+
}
442452

443453
user.sessionCSRF = commUtils.getSetCookieValue(resp, "csrftoken");
444454
user.sessionId = commUtils.getSetCookieValue(resp, "LEETCODE_SESSION");

0 commit comments

Comments
 (0)