Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R4R] - {develop}: fix consensys audit issue: cs-6.40 #1210

Merged
merged 2 commits into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tss/node/server/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ func (hs *Server) newHandler(jwtSecretStr string) (http.Handler, error) {
router.Use(logMiddleware())
if jwtSecretStr != "" {
return cmm.NewJwtHandler(router, jwtSecretStr)
}else {
return router,nil
} else {
return router, nil
}
}

Expand Down Expand Up @@ -196,7 +196,7 @@ func (hs *Server) keySignHandler(w http.ResponseWriter, r *http.Request) {
return
}

jsonResult, err := json.MarshalIndent(signResp, "", " ")
jsonResult, err := json.Marshal(signResp)
if err != nil {
hs.logger.Error().Err(err).Msg("fail to marshal response to json message")
w.WriteHeader(http.StatusInternalServerError)
Expand Down
2 changes: 1 addition & 1 deletion tss/ws/server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ func (wsc *wsConnection) writeRoutine() {
}
case msg := <-wsc.requestChan:
wsc.Logger.Info("send msg from requestChan to target client", "method", msg.Method)
jsonBytes, err := json.MarshalIndent(msg, "", " ")
jsonBytes, err := json.Marshal(msg)
if err != nil {
wsc.Logger.Error("Failed to marshal RPCRequest to JSON", "err", err)
continue
Expand Down
Loading