on master help sign in
Do not accept trailing characters after parsing a version in the FromJSON Version instance..
commit95dcd706236838e50496361b71e207f4a78fe098 authorDaniel Díaz <dhelta.diaz@gmail.com> dateFri 23 Oct 2015, 10:49 (11 years ago) parent11c9240
1 file changed+1−1
Data/Aeson/Types/Instances.hs+1−1
Data/Aeson/Types/Instances.hs+1−1
@@ -1479,7 +1479,7 @@ instance FromJSON Version where
14791479 {-# INLINE parseJSON #-}
14801480 parseJSON = withText "Version" $ go . readP_to_S parseVersion . unpack
14811481 where
1482− go [(v,_)] = return v
1482+ go [(v,[])] = return v
14831483 go (_ : xs) = go xs
14841484 go _ = fail $ "could not parse Version"
14851485