Draft-3 time format accepts unpadded components and non-ASCII digits
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先找到 Draft 3 的 time 格式检查器及其测试;issue 未注明它们的文件路径。检查解析如何处理未补零的组成部分和 Unicode 数字,然后将其行为与更严格的日期和 UUID 检查器进行比较。完成标准是:格式错误的示例会被拒绝,补零后的时间会被接受,并且对非字符串值的行为保持不变。
由索引模型根据 Issue 内容生成。
描述
With format checking explicitly enabled, Draft3Validator accepts malformed time strings:
from jsonschema import Draft3Validator
v = Draft3Validator({"format": "time"}, format_checker=Draft3Validator.FORMAT_CHECKER)
v.is_valid("1:2:3") # True
v.is_valid("01:0\u0662:03") # True
The draft-3 specification describes time as hh:mm:ss: https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-03#section-5.23 . Python strptime accepts missing padding and Unicode decimal digits, so parsing successfully does not establish the required textual format. The date and UUID format checkers already enforce stricter textual representations.
Expected: reject these malformed strings while accepting padded times and preserving non-string behavior. Five malformed-value subtests fail on unchanged main. A focused fix compares the parsed time's canonical HH:MM:SS representation with the original input.
Impact: invalid time data passes explicitly requested format validation in applications using draft-3 schemas. I assess this as medium severity, not a maintainer-assigned severity label. Codex assisted with investigation, implementation and tests.
- 主要语言
- Python
- 星标
- 5k
- 派生
- 741
- 平均合并
- 4 天 17 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-jsonschema/jsonschema 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
python-jsonschema/jsonschema#1588 · 2 条评论 ·
维护者通常 6 天内回复
-
Iterator error contexts lose parent links and absolute paths可能重新可做 @DawnofGenX 于 59 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
python-jsonschema/jsonschema#1584 · 3 条评论 ·
维护者通常 6 天内回复
-
regex format checker crashes with RecursionError on deeply nested patterns可能已有人在做 @DawnofGenX 于 59 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
python-jsonschema/jsonschema#1538 · 1 条评论 ·
维护者通常 6 天内回复
-
is_duration raises an uncaught decimal.Overflow on a duration with a large exponent可能重新可做 关联的 PR 已关闭且未合并。 未关闭Needs Test Upstream
难度 2/5 1-3 小时 新手友好度 78/100
python-jsonschema/jsonschema#1511 · 1 条评论 ·
维护者通常 6 天内回复
-
python-jsonschema/jsonschema#1605 ·
维护者通常 6 天内回复
查看 python-jsonschema/jsonschema 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 78/100
web-push-libs/pywebpush#216 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
AgriciDaniel/claude-seo#572 ·
维护者通常 5 天内回复
-
area:print-dispatch
难度 2/5 1-3 小时 新手友好度 92/100
维护者通常 1 天内回复
-
area: docs domain: technical-writing good first issue type: documentation
难度 2/5 1-3 小时 新手友好度 80/100
Deepak3699/Ai_Mentor#919 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复