We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Time zone offset parser doesn't ensure only digits are used.
To Reproduce With gotoml-test-decoder:
$ echo "0=0000-01-01 00:00:00+00:0Z" | gotoml-test-decoder { "0": { "type": "datetime", "value": "0000-01-01T00:00:00+00:42" } }
Test cases:
diff --git a/unmarshaler_test.go b/unmarshaler_test.go index c29f9ac..d6bd268 100644 --- a/unmarshaler_test.go +++ b/unmarshaler_test.go @@ -2632,6 +2632,14 @@ world'`, desc: `invalid number of seconds digits with trailing digit`, data: `a=0000-01-01 00:00:000000Z3`, }, + { + desc: `invalid character in zone offset hours`, + data: `a=0000-01-01 00:00:00+0Z:00`, + }, + { + desc: `invalid character in zone offset minutes`, + data: `a=0000-01-01 00:00:00+00:0Z`, + }, { desc: `invalid number of seconds`, data: `a=0000-01-01 00:00:00+27000`,
Expected behavior Expected to receive an error.
Versions
Additional context Found while doing differential fuzzing against toml-dart.
toml-dart
The text was updated successfully, but these errors were encountered:
Decoder: check for invalid chars in timezone
b0864c7
Fixes #694
Thought I had completely removed that function that doesn't check errors when parsing digits 😅
Sorry, something went wrong.
Decoder: check for invalid chars in timezone (#695)
9bf9be6
Fixed in 9bf9be6. The offending function is no more.
No branches or pull requests
Describe the bug
Time zone offset parser doesn't ensure only digits are used.
To Reproduce
With gotoml-test-decoder:
Test cases:
Expected behavior
Expected to receive an error.
Versions
Additional context
Found while doing differential fuzzing against
toml-dart
.The text was updated successfully, but these errors were encountered: