File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -548,7 +548,7 @@ var (
548
548
}
549
549
JWTSecretFlag = cli.StringFlag {
550
550
Name : "authrpc.jwtsecret" ,
551
- Usage : "JWT secret (or path to a jwt secret) to use for authenticated RPC endpoints" ,
551
+ Usage : "Path to a JWT secret to use for authenticated RPC endpoints" ,
552
552
}
553
553
// Logging and debug settings
554
554
EthStatsURLFlag = cli.StringFlag {
Original file line number Diff line number Diff line change @@ -346,17 +346,8 @@ func (n *Node) closeDataDir() {
346
346
// or from the default location. If neither of those are present, it generates
347
347
// a new secret and stores to the default location.
348
348
func (n * Node ) obtainJWTSecret (cliParam string ) ([]byte , error ) {
349
- var fileName string
350
- if len (cliParam ) > 0 {
351
- // If a plaintext secret was provided via cli flags, use that
352
- jwtSecret := common .FromHex (cliParam )
353
- if len (jwtSecret ) == 32 && strings .HasPrefix (cliParam , "0x" ) {
354
- log .Warn ("Plaintext JWT secret provided, please consider passing via file" )
355
- return jwtSecret , nil
356
- }
357
- // path provided
358
- fileName = cliParam
359
- } else {
349
+ fileName := cliParam
350
+ if len (fileName ) == 0 {
360
351
// no path provided, use default
361
352
fileName = n .ResolvePath (datadirJWTKey )
362
353
}
You can’t perform that action at this time.
0 commit comments