From 4e7a03f5cfe6f345e6c890b00c2abedbf3feb579 Mon Sep 17 00:00:00 2001 From: nicholas cristofaro Date: Fri, 17 May 2024 12:11:31 -0300 Subject: [PATCH 1/2] dev: Update unmarshalNBytes to return nil when len of value is zero --- pkg/types/types.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/types/types.go b/pkg/types/types.go index 0e89bea0f9..37ea74ddca 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -133,8 +133,7 @@ func unmarshalNBytes(s *jsonplugin.UnmarshalState, n int) []byte { switch len(trimmed) { case 0: - b := make([]byte, n) - return b + return nil case hex.EncodedLen(n): b, err := hex.DecodeString(trimmed) if err != nil { From 7c46115b7db1faff74a93a6cd6c7a68173f915a8 Mon Sep 17 00:00:00 2001 From: nicholas cristofaro Date: Sun, 19 May 2024 16:04:37 -0300 Subject: [PATCH 2/2] dev: Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e378c4592..7994a58ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ For details about compatibility between different releases, see the **Commitment - Increased the timeout for Basic Station gateways sending HTTP headers. There should now be enough time for embedded devices with little to no hardware acceleration to perform a TLS handshake. In particular, The Things Indoor Gateway can now connect to The Things Stack presenting a ECDSA certificate. - Reconnect a gateway when the antenna gain is adjusted. +- JSON requests where the `eui` field is explicitly set to `null` are no longer converted to an array of zeros. ### Security