关注列表粉丝列表403
这两个接口需要 __client_id cookie。似乎只要格式对就行,内容可以伪造。也欢迎 PR。
刷新一遍又出来了
发件人: ud2 @.> 发送时间: Monday, August 25, 2025 10:54:27 PM 收件人: 0f-0b/luogu-api-docs @.> 抄送: Eternity-Sky @.>; Author @.> 主题: Re: [0f-0b/luogu-api-docs] 关注列表粉丝列表403 (Issue #43)
[https://avatars.githubusercontent.com/u/11265785?s=20&v=4]0f-0b left a comment (0f-0b/luogu-api-docs#43)https://github.com/0f-0b/luogu-api-docs/issues/43#issuecomment-3220620106
这两个接口需要 __client_id cookie。似乎只要格式对就行,内容可以伪造。也欢迎 PR。
― Reply to this email directly, view it on GitHubhttps://github.com/0f-0b/luogu-api-docs/issues/43#issuecomment-3220620106, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BKB3TY36N4UH34XBN2RK5RD3PMPSHAVCNFSM6AAAAACEW7ESKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMRQGYZDAMJQGY. You are receiving this because you authored the thread.Message ID: @.***>
请问你整理的api,提交说没有登录是怎么回事,是cookie的问题?
发件人: ud2 @.> 发送时间: Monday, August 25, 2025 10:54:27 PM 收件人: 0f-0b/luogu-api-docs @.> 抄送: Eternity-Sky @.>; Author @.> 主题: Re: [0f-0b/luogu-api-docs] 关注列表粉丝列表403 (Issue #43)
[https://avatars.githubusercontent.com/u/11265785?s=20&v=4]0f-0b left a comment (0f-0b/luogu-api-docs#43)https://github.com/0f-0b/luogu-api-docs/issues/43#issuecomment-3220620106
这两个接口需要 __client_id cookie。似乎只要格式对就行,内容可以伪造。也欢迎 PR。
― Reply to this email directly, view it on GitHubhttps://github.com/0f-0b/luogu-api-docs/issues/43#issuecomment-3220620106, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BKB3TY36N4UH34XBN2RK5RD3PMPSHAVCNFSM6AAAAACEW7ESKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMRQGYZDAMJQGY. You are receiving this because you authored the thread.Message ID: @.***>
刷新一遍又出来了
如果请求里没有 __client_id cookie,那么服务器会通过 set-cookie 响应头下发一个合法的 __client_id,所以第二次请求就正常了。
提交说没有登录是怎么回事,是 cookie 的问题?
一般来说是的。
另外我在你的仓库里发现了严重的安全漏洞,比如这一行代码把用户的签名直接拼接到 HTML 里;如果攻击者在签名里加了 HTML 标签并关注了你,那么你查询粉丝列表时就会执行其中的代码,从而让攻击者以你的名义调用洛谷任意接口。采用 AI 生成的代码之前还请好好审核。
谢
发件人: ud2 @.> 发送时间: Tuesday, August 26, 2025 9:54:06 AM 收件人: 0f-0b/luogu-api-docs @.> 抄送: Eternity-Sky @.>; Author @.> 主题: Re: [0f-0b/luogu-api-docs] 关注列表粉丝列表403 (Issue #43)
[https://avatars.githubusercontent.com/u/11265785?s=20&v=4]0f-0b left a comment (0f-0b/luogu-api-docs#43)https://github.com/0f-0b/luogu-api-docs/issues/43#issuecomment-3222279590
另外我在你的仓库里发现了严重的安全漏洞,比如这一行代码https://github.com/Eternity-Sky/luogu-problem-reader/blob/d541e384e6b3646af9e003b255fb74f4a26ab16d/profile.html#L1655把用户的签名直接拼接到 HTML 里;如果攻击者在签名里加了 HTML 标签并关注了你,那么你查询粉丝列表时就会执行其中的代码,从而让攻击者以你的名义调用洛谷任意接口。采用 AI 生成的代码之前还请好好审核。
― Reply to this email directly, view it on GitHubhttps://github.com/0f-0b/luogu-api-docs/issues/43#issuecomment-3222279590, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BKB3TY7ZWQQC2UIXIFPQJ6D3PO435AVCNFSM6AAAAACEW7ESKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMRSGI3TSNJZGA. You are receiving this because you authored the thread.Message ID: @.***>
依然403未登陆啊
服务器返回 set-cookie: _uid=0 可能是 __client_id 不合法导致的。确定 cookie 请求头的值包含正确的 __client_id 和 _uid 吗?