From 021d6fbbbbdfe295dbb3619f8ec3fc8662c1e26a Mon Sep 17 00:00:00 2001 From: a e r t h Date: Thu, 26 Jul 2018 03:57:20 -0700 Subject: cmd: prevent accidental invalid commands (#17248) * cmd: stop parsing bootnodes if one is invalid * cmd/geth: require valid command as argument (or no arg) --- cmd/geth/main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd/geth') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 1c618de35..77ef6afe2 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -251,6 +251,9 @@ func main() { // It creates a default node based on the command line arguments and runs it in // blocking mode, waiting for it to be shut down. func geth(ctx *cli.Context) error { + if args := ctx.Args(); len(args) > 0 { + return fmt.Errorf("invalid command: %q", args[0]) + } node := makeFullNode(ctx) startNode(ctx, node) node.Wait() -- cgit v1.2.3