XMOJ-Script-dev / XMOJ-bbs

XMOJ增强脚本后台
https://api.xmoj-bbs.me
GNU Affero General Public License v3.0
5 stars 1 forks source link

[Feature Request] [提案] 为每一位用户使用独立token校验 #24

Closed PythonSmall-Q closed 6 months ago

PythonSmall-Q commented 6 months ago

检查项

描述

为增加安全性,设想当每一个用户运行脚本时从服务器请求一个token(服务器端会在D1中存储,用户端在本地GM存储token和请求时间,10/15days or longer的有效时间,超过有效时间自动refresh),每一次向服务器POST时bearer里增加token,服务器校验正确就继续,否则abort并报403

原因

突发奇想的内容

~念念不忘,必有回响~

boomzero commented 6 months ago

没用。如果我是attacker, 我只需要问服务器要一个token即可

Sent from my iPad

On May 5, 2024, at 19:49, Shan Wenxiao @.***> wrote:

 检查项

我已确认了XMOJ增强脚本已为最新版,且最新版未实现这一功能。 我已在 Issues 页面 中搜索,确认了这一提案未被提交过。 描述

为增加安全性,设想当每一个用户运行脚本时从服务器请求一个token(服务器端会在D1中存储,用户端在本地GM存储token和请求时间,10/15days or longer的有效时间,超过有效时间自动refresh),每一次向服务器POST时bearer里增加token,服务器校验正确就继续,否则abort并报403

原因

突发奇想的内容

念念不忘,必有回响

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.

boomzero commented 6 months ago

你达到什么目的?remove backwards compatibility?

Sent from my iPad

On May 5, 2024, at 19:49, Shan Wenxiao @.***> wrote:

 检查项

我已确认了XMOJ增强脚本已为最新版,且最新版未实现这一功能。 我已在 Issues 页面 中搜索,确认了这一提案未被提交过。 描述

为增加安全性,设想当每一个用户运行脚本时从服务器请求一个token(服务器端会在D1中存储,用户端在本地GM存储token和请求时间,10/15days or longer的有效时间,超过有效时间自动refresh),每一次向服务器POST时bearer里增加token,服务器校验正确就继续,否则abort并报403

原因

突发奇想的内容

念念不忘,必有回响

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.

boomzero commented 6 months ago

显然你做太多语文阅读了(

On May 5, 2024, at 19:49, Shan Wenxiao @.***> wrote:

 检查项

我已确认了XMOJ增强脚本已为最新版,且最新版未实现这一功能。 我已在 Issues 页面 中搜索,确认了这一提案未被提交过。 描述

为增加安全性,设想当每一个用户运行脚本时从服务器请求一个token(服务器端会在D1中存储,用户端在本地GM存储token和请求时间,10/15days or longer的有效时间,超过有效时间自动refresh),每一次向服务器POST时bearer里增加token,服务器校验正确就继续,否则abort并报403

原因

突发奇想的内容

念念不忘,必有回响

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.

PythonSmall-Q commented 6 months ago

额有道理

PythonSmall-Q commented 6 months ago

语文阅读怎么你了(doge

PythonSmall-Q commented 6 months ago

image 这么写不会报错吧,zhouyiqing想看ac代码

PythonSmall-Q commented 6 months ago

但感觉想做一个类似GitHub PAT一样的auth

PythonSmall-Q commented 6 months ago

~那GitHub怎么做的照搬就可以了呗~

boomzero commented 6 months ago

PHPSESSID不行吗?

On May 5, 2024, at 20:10, Shan Wenxiao @.***> wrote:

那GitHub怎么做的照搬就可以了呗

— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-bbs/issues/24#issuecomment-2094782548, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZNAC6ULLRT2QU53TMTZAYOURAVCNFSM6AAAAABHHU5YNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUG44DENJUHA. You are receiving this because you were assigned.

PythonSmall-Q commented 6 months ago

okay