common: json_to_s64 and json_to_double still accept hex, octal and signs
维护者通常 2 天内回复
评估
调研方向
首先定位 json_to_s64() 和 json_to_double(),然后将它们的解析行为与 json_to_u64() 以及 issue 中描述的严格 str_to_u64() 路径进行比较。验证十六进制数、八进制数和显式符号会被拒绝,而有效的 JSON 数字仍会被接受,包括所指出的从 "010" 到 10 的变化。
由索引模型根据 Issue 内容生成。
描述
#9150 routed json_to_u64() through the new str_to_u64(), which accepts strict decimal only. json_to_s64() and json_to_double() still use strtoll/strtod with base 0, so they accept hex (0x...), octal, and a leading +/-, none of which are valid JSON numbers. u64 is now asymmetric with the other two.
Note the u64 change already altered one case: "010" used to parse as 8 (base-0 octal) and now parses as 10. Correct per JSON, but worth being aware of when tightening the others.
No urgency, this has been the parsing behaviour for a long time.
- 主要语言
- C
- 星标
- 3.1k
- 派生
- 1k
- 平均合并
- 4 天 11 小时
- 30 天内合并 PR
- 30
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ElementsProject/lightning 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
ElementsProject/lightning#9634 ·
维护者通常 2 天内回复
-
plugins/recover: missing comma in nodes_for_gossip concatenates two bootstrap addresses into invalid address可能已有人在做 @bhuvan-somisetty 于 6 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
ElementsProject/lightning#9630 ·
维护者通常 2 天内回复
-
common/json_parse: json_to_bitcoin_amount fails to detect overflow and accepts negative/empty inputs可能已有人在做 @bhuvan-somisetty 于 10 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
ElementsProject/lightning#9617 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
ElementsProject/lightning#9616 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
ElementsProject/lightning#9593 ·
维护者通常 2 天内回复
查看 ElementsProject/lightning 的全部 Issue
相似的 Issue
-
v9.6.0: CMake incorrectly enforces presence of libevdev可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug Component component: net
难度 2/5 1-3 小时 新手友好度 78/100
RT-Thread/rt-thread#11913 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
contiki-ng/contiki-ng#3289 ·
维护者通常 3 天内回复
-
area:docs help wanted type:enhancement
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复