tdam-dir: Avoid sending secrets when propagating notes. - tordam - A library for peer discovery inside the Tor network (HTM) git clone https://git.parazyd.org/tordam (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit cafa0dc4bc3eea39112002a70f705130d23db746 (DIR) parent 9d94345269ed0c29bba97161e15ff29aa262f39f (HTM) Author: parazyd <parazyd@dyne.org> Date: Mon, 22 Oct 2018 16:01:16 +0200 dam-dir: Avoid sending secrets when propagating notes. Diffstat: M cmd/dam-dir/main.go | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) --- (DIR) diff --git a/cmd/dam-dir/main.go b/cmd/dam-dir/main.go t@@ -174,6 +174,7 @@ func handlePost(rw http.ResponseWriter, request *http.Request) { lib.CheckError(err) if nodedata["valid"] == "1" { nodemap[i] = nodedata + delete(nodemap[i], "secret") } } } else { t@@ -183,6 +184,7 @@ func handlePost(rw http.ResponseWriter, request *http.Request) { nodedata, err := lib.RedisCli.HGetAll(us).Result() lib.CheckError(err) nodemap[us] = nodedata + delete(nodemap[us], "secret") } nodestr, err := json.Marshal(nodemap)