diff options
Diffstat (limited to 'autopeer_shell.py')
| -rwxr-xr-x | autopeer_shell.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autopeer_shell.py b/autopeer_shell.py index 0e15930..d981676 100755 --- a/autopeer_shell.py +++ b/autopeer_shell.py @@ -82,7 +82,7 @@ class AutopeerShell(cmd.Cmd): def do_addpeer(self, name, pubkey, endpoint, port, ipll): '''<name> <wg pubkey> <wg address> <wg port> <ipv6 link local> Add a new peer''' - NAME_REGEX = r'^[a-zA-Z][a-zA-Z0-9]+$' + NAME_REGEX = r'^[a-zA-Z][a-zA-Z0-9]{0,8}$' if not re.match(NAME_REGEX, name): print(f'Error: name must match {NAME_REGEX}', file=sys.stderr) return |
