Skip to content

Reject invalid ISO 8601 duration strings#63

Open
akselinurmio wants to merge 7 commits into
sosodev:mainfrom
akselinurmio:parser-enhancements
Open

Reject invalid ISO 8601 duration strings#63
akselinurmio wants to merge 7 commits into
sosodev:mainfrom
akselinurmio:parser-enhancements

Conversation

@akselinurmio
Copy link
Copy Markdown

Adds rank-based ordering enforcement to the ISO 8601 duration parser so that duplicate designators, out-of-order designators, repeated T separators, bare PT, and non-ASCII digits all return ErrUnexpectedInput instead of silently parsing into incorrect values. Replaces the unicode.IsNumber check with an ASCII-only digit guard to close the non-ASCII digit leak. Test coverage added for all newly rejected inputs.

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.

1 participant