Skip to content

资源校验 #566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 21, 2025
Merged

资源校验 #566

merged 3 commits into from
Jul 21, 2025

Conversation

cyfung1031
Copy link
Contributor

@cyfung1031 cyfung1031 commented Jul 21, 2025

https://www.tampermonkey.net/documentation.php?locale=en#api:Subresource_Integrity

我不清楚 #sha256=abc123==&sha512=def456== 這個出處何來
但TM有明確規定接受 #sha256-abc123==,sha512-def456==

@CodFrm
Copy link
Member

CodFrm commented Jul 21, 2025

感谢,我有遗漏,我看看

@cyfung1031
Copy link
Contributor Author

cyfung1031 commented Jul 21, 2025

補充:
TM文档说可以接受 Base64 hash
但我没见过有人这样用

@CodFrm
Copy link
Member

CodFrm commented Jul 21, 2025

@cyfung1031 这一个脚本就是base64 https://greasyfork.org/zh-CN/scripts/393991-nga%E4%BC%98%E5%8C%96%E6%91%B8%E9%B1%BC%E4%BD%93%E9%AA%8C

#sha256=abc123==&sha512=def456== 这个是我按正常的url进行处理的

@cyfung1031
Copy link
Contributor Author

cyfung1031 commented Jul 21, 2025

@cyfung1031 这一个脚本就是base64 https://greasyfork.org/zh-CN/scripts/393991-nga%E4%BC%98%E5%8C%96%E6%91%B8%E9%B1%BC%E4%BD%93%E9%AA%8C

#sha256=abc123==&sha512=def456== 这个是我按正常的url进行处理的

正常url 是 ?abc=123&def=456 這樣吧
如果值有 = 要encodeURIComponent

這個用#

我覺得應該沒有 #sha256=abc123==&sha512=def456== 這個

@CodFrm
Copy link
Member

CodFrm commented Jul 21, 2025

也许没有,TM也不支持,那就让我和他保持一致吧

@CodFrm CodFrm merged commit 5fadca5 into scriptscat:main Jul 21, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants