Skip to content

Commit

Permalink
do not log sensitive data
Browse files Browse the repository at this point in the history
Signed-off-by: p4u <[email protected]>
  • Loading branch information
p4u committed Oct 28, 2023
1 parent 07ead4c commit dc766ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/censusdb/censusdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ func (c *CensusDB) ImportCensusDB(buffer io.Reader) error {
if err != nil {
return err
}
log.Infow("importing census", "id", dump.CensusID.String(), "token", dump.Token.String(), "size", len(dump.Data))
log.Infow("importing census", "id", dump.CensusID.String(), "size", len(dump.Data))
}

return nil
Expand Down
3 changes: 2 additions & 1 deletion apiclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func NewHTTPclient(addr *url.URL, bearerToken *uuid.UUID) (*HTTPclient, error) {
return nil, err
}
if status != apirest.HTTPstatusOK {
return nil, fmt.Errorf("%s: %d (%s)", errCodeNot200, status, data)
log.Warnw("cannot get chain info from API server", "status", status, "data", data)
return c, nil
}
info := &api.ChainInfo{}
if err := json.Unmarshal(data, info); err != nil {
Expand Down
1 change: 0 additions & 1 deletion vochain/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ func newTendermint(app *BaseApplication,
}
pv.Save()
if pv.Key.PrivKey.Bytes() != nil {
fmt.Printf("privkey: %s\n", hex.EncodeToString(pv.Key.PrivKey.Bytes()))
signer := ethereum.SignKeys{}
if err := signer.AddHexKey(hex.EncodeToString(pv.Key.PrivKey.Bytes())); err != nil {
return nil, fmt.Errorf("cannot add private validator key: %w", err)
Expand Down

0 comments on commit dc766ea

Please sign in to comment.