From f54b44f4589f6b0958f86f8186e996a8e2dbd119 Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Mon, 5 Aug 2019 23:31:53 +0200 Subject: [PATCH] bugs... --- http.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/http.go b/http.go index 24c78f8..23f09a6 100644 --- a/http.go +++ b/http.go @@ -177,17 +177,17 @@ func (it *httpServer) writeResponse(writer http.ResponseWriter, v interface{}) e } func (it *httpServer) verifyRequest(r *http.Request, v interface{}) (error) { - all, err := ioutil.ReadAll(hex.NewDecoder(r.Body)) + hexBody, err := ioutil.ReadAll(r.Body) if err != nil { return err } - body, err := ioutil.ReadAll(r.Body) + all, err := hex.DecodeString(string(hexBody)) if err != nil { return err } - log.Printf("req: %s", body) + log.Printf("req: %s", hexBody) encPasswordAndIV := all[:256] encBody := all[256:]