From df5409c9527ab342c862b20cd0ea511650f811cd Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 4 Apr 2019 09:16:34 +0200 Subject: [PATCH] 'sanitize' JSON input Co-Authored-By: gballet --- accounts/hd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/hd.go b/accounts/hd.go index 574aa77f9..30963326f 100644 --- a/accounts/hd.go +++ b/accounts/hd.go @@ -136,7 +136,7 @@ func (path DerivationPath) String() string { } func (path DerivationPath) MarshalJSON() ([]byte, error) { - return []byte(fmt.Sprintf("\"%s\"", path.String())), nil + return json.Marshal(fmt.Sprintf("\"%s\"", path.String())) } func (path *DerivationPath) UnmarshalJSON(b []byte) error {