mod: csrf

This commit is contained in:
My-Responsitories
2025-04-17 21:57:25 +08:00
parent 70edd4cc3a
commit ebe08c23e4
14 changed files with 52 additions and 51 deletions

View File

@@ -234,7 +234,7 @@ class ReplyHttp {
'pn': pageNum,
'type': type,
'sort': 1,
if (isLogin) 'csrf': await Request.getCsrf(),
if (isLogin) 'csrf': Accounts.main.csrf,
},
options: isLogin.not ? _options : null,
);
@@ -342,7 +342,7 @@ class ReplyHttp {
'oid': oid,
'rpid': rpid,
'action': action,
'csrf': await Request.getCsrf(),
'csrf': Accounts.main.csrf,
},
options: Options(
contentType: Headers.formUrlEncodedContentType,
@@ -369,7 +369,7 @@ class ReplyHttp {
'oid': oid,
'rpid': rpid,
'action': action,
'csrf': await Request.getCsrf(),
'csrf': Accounts.main.csrf,
},
);
if (res.data['code'] == 0) {
@@ -406,7 +406,7 @@ class ReplyHttp {
'type': type,
'rpid': rpid,
'action': isUpTop ? 0 : 1,
'csrf': await Request.getCsrf(),
'csrf': Accounts.main.csrf,
},
options: Options(
contentType: Headers.formUrlEncodedContentType,