Draft-3 time format accepts unpadded components and non-ASCII digits
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start by locating the Draft 3 time format checker and its tests; the issue does not name their file paths. Check how parsing handles unpadded components and Unicode digits, then compare its behavior with the stricter date and UUID checkers. Done means malformed examples are rejected, padded times are accepted, and non-string behavior is preserved.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 741
- Avg merge
- 4d 17h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from python-jsonschema/jsonschema
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
python-jsonschema/jsonschema#1588 · 2 comments ·
Maintainers usually reply within 6 days
-
Iterator error contexts lose parent links and absolute pathsMay be free again @DawnofGenX claimed this 59 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
python-jsonschema/jsonschema#1584 · 3 comments ·
Maintainers usually reply within 6 days
-
regex format checker crashes with RecursionError on deeply nested patternsPossibly taken @DawnofGenX claimed this 59 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
python-jsonschema/jsonschema#1538 · 1 comment ·
Maintainers usually reply within 6 days
-
is_duration raises an uncaught decimal.Overflow on a duration with a large exponentMay be free again A pull request for this issue was closed without being merged. OpenNeeds Test Upstream
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
python-jsonschema/jsonschema#1511 · 1 comment ·
Maintainers usually reply within 6 days
-
python-jsonschema/jsonschema#1605 ·
Maintainers usually reply within 6 days
All issues in python-jsonschema/jsonschema
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
web-push-libs/pywebpush#216 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AgriciDaniel/claude-seo#572 ·
Maintainers usually reply within 5 days
-
area:print-dispatch
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
area: docs domain: technical-writing good first issue type: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Deepak3699/Ai_Mentor#919 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day