You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the text notation, timestamp values must be followed by one of the fifteen numeric stop-characters: {}[](),\"\'\ \t\n\r\v\f.
However, ion-js allows almost any character after a timestamp when the timestamp has a precision of year or month. Here are some examples of invalid Ion that are incorrectly accepted by ion-js.
The Ion Spec says
However,
ion-js
allows almost any character after a timestamp when the timestamp has a precision ofyear
ormonth
. Here are some examples of invalid Ion that are incorrectly accepted byion-js
.2001TZ
2001T 'Z'
2001T+inf
2001T +inf
2001-01T10.00
2001-01T 10.00
(2001-01TZ+10)
( 2001-01T 'Z' '+' 10 )
(2001-01T.0.10)
( 2001-01T '.' 0.10 )
2001-01Tnull.bool
2001-01T null.bool
The probable cause is that there is no check for a numeric stop character after the
T
for theYYYY
andYYYY-MM
branches of_readTimestamp()
.https://github.com/amzn/ion-js/blob/b5f6ab34707b57767b54f55845ae97ebb77b248f/src/IonParserTextRaw.ts#L1093-L1110
The text was updated successfully, but these errors were encountered: