1
0
mirror of https://github.com/golang/go synced 2024-11-18 15:24:41 -07:00
go/src/encoding
Lucas Bremgartner c1000c500c encoding/json: validate strings when decoding into Number
Unmarshaling a string into a json.Number should first check that the string is a valid Number.
If not, we should fail without decoding it.

Fixes #14702

Change-Id: I286178e93df74ad63c0a852c3f3489577072cf47
GitHub-Last-Rev: fe69bb68ee
GitHub-Pull-Request: golang/go#34272
Reviewed-on: https://go-review.googlesource.com/c/go/+/195045
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-09-16 21:56:53 +00:00
..
ascii85 encoding/ascii85: make bigtest big again 2017-06-23 14:28:30 +00:00
asn1 encoding/asn1: handle ASN1's string type BMPString 2019-09-09 23:04:30 +00:00
base32 encoding/base32: increase performance and code reuse 2019-09-11 00:56:39 +00:00
base64 encoding/base64: speed up the decoder 2019-03-13 10:39:58 +00:00
binary all: simplify code using "gofmt -s -w" 2019-05-06 22:19:22 +00:00
csv src: gofmt -s 2019-09-09 18:57:05 +00:00
gob src: gofmt -s 2019-09-09 18:57:05 +00:00
hex encoding/hex: simplify encoder arithmetic 2019-03-05 17:40:09 +00:00
json encoding/json: validate strings when decoding into Number 2019-09-16 21:56:53 +00:00
pem all: remove PEM-encoded private keys from tests 2019-05-21 20:03:55 +00:00
xml std: remove unused bits of code all over the place 2019-09-02 12:57:37 +00:00
encoding.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00