]> Cypherpunks repositories - gostls13.git/commit
encoding/json: add security section to doc
authorRoland Shoemaker <roland@golang.org>
Thu, 26 Jun 2025 19:19:23 +0000 (12:19 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 27 Jun 2025 20:38:47 +0000 (13:38 -0700)
commit2a22aefa1f7befb0ac7a95c918b75b05919c1907
tree29f11769b584193614d6313dcdbae58d6e153b11
parent742fda95246958076e439bbcf71fedda43a894bb
encoding/json: add security section to doc

Add a section to the package doc which details the security
considerations of using encoding/json, in particular with respect to
parser misalignment issues.

Additionally, clarify previously ambiguous statement in the Unmarshal
doc about how case is used when matching keys in objects, and add a note
about how duplicate keys are handled.

Fixes #14750

Change-Id: I66f9b845efd98c86a684d7333b3aa8a456564922
Reviewed-on: https://go-review.googlesource.com/c/go/+/684315
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
src/encoding/json/decode.go
src/encoding/json/encode.go