diff options
Diffstat (limited to 'conf/parser.go')
-rw-r--r-- | conf/parser.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/conf/parser.go b/conf/parser.go index 3b2ae1b3..b9ceb20e 100644 --- a/conf/parser.go +++ b/conf/parser.go @@ -189,6 +189,9 @@ func (c *Config) maybeAddPeer(p *Peer) { } func FromWgQuick(s string, name string) (*Config, error) { + if !TunnelNameIsValid(name) { + return nil, &ParseError{"Tunnel name is not valid", name} + } lines := strings.Split(s, "\n") parserState := notInASection conf := Config{Name: name} |