KeyChecker: "key_ops" does not tell content decryption from key unwrapping, and "deriveKey"/"deriveBits" are not accepted on both sides
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading KeyChecker::checkKeyUsage() and tracing the encryption and decryption paths for dir and ECDH-ES. The issue specifies the expected dir operations and that deriveKey and deriveBits should both work on either side for key agreement. Check the existing tests for those modes and add coverage showing those cases pass while wrapping-only keys cannot decrypt dir content.
由索引模型根据 Issue 内容生成。
描述
Version(s) affected
All released versions (3.4.x, 4.0.x, 4.1.x, 4.2.x), and the 4.3.x and 5.0.x branches.
Description
KeyChecker::checkKeyUsage() accepts any of decrypt, unwrapKey and deriveBits for every decryption, and any of encrypt, wrapKey and deriveKey for every encryption, whatever the key management mode. Two consequences:
- A key restricted to
["wrapKey", "unwrapKey"], meant for key wrapping only, can still decryptdircontent.key_opstherefore does not prevent the key confusion described in #760. - The two lists disagree for key agreement: a key restricted to
deriveKeycan encrypt with ECDH-ES but cannot decrypt, and a key restricted toderiveBitscan decrypt but cannot encrypt.
Possible Solution
- 4.3.0:
dirrequiresencryptwhen building anddecryptwhen decrypting;deriveKeyandderiveBitsare both accepted on both sides for key agreement. - A strict mapping per key management mode would refuse keys exported by WebCrypto (for example AES-GCM keys with
encrypt/decryptused for A*GCMKW, RSA keys withdecryptused for RSA-OAEP, or ECDH public keys exported with an emptykey_ops). It is left for 5.0.0, if at all.
Additional Context
Found by the Anthropic OSS Scanner (ANT-2026-Z8KOO4J9).
- 主要语言
- PHP
- 星标
- 954
- 派生
- 119
- 平均合并
- 48 分钟
- 30 天内合并 PR
- 17
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
web-token/jwt-framework 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 74/100
web-token/jwt-framework#757 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 68/100
web-token/jwt-framework#773 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 57/100
web-token/jwt-framework#772 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 55/100
web-token/jwt-framework#771 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 48/100
web-token/jwt-framework#770 ·
维护者通常 1 天内回复
查看 web-token/jwt-framework 的全部 Issue
相似的 Issue
-
sync-en
难度 1/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Plugin directory: block icon SVG loses elements other than <path> in the Blocks section可能已有人在做 @obenland 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
WordPress/wordpress.org#1209 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
docs good first issue php
难度 1/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复
-
enhancement UI
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复