Skip to content

Commit

Permalink
use JWT when and only when the user specifies a JWT secret explicitly (
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec authored and zah committed Jun 28, 2022
1 parent 3514d39 commit baf38c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beacon_chain/nimbus_beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,9 @@ proc init*(T: type BeaconNode,
quit 1

let optJwtSecret =
if cfg.BELLATRIX_FORK_EPOCH != FAR_FUTURE_EPOCH:
# Some Web3 endpoints aren't compatible with JWT, but if explicitly chosen,
# use it regardless.
if config.jwtSecret.isSome:
let jwtSecret = rng[].checkJwtSecret(
string(config.dataDir), config.jwtSecret)
if jwtSecret.isErr:
Expand Down

0 comments on commit baf38c3

Please sign in to comment.