From 11264a6861c517536fc6d4b9163f8bf1147a22f3 Mon Sep 17 00:00:00 2001 From: Lennart Hansen Date: Thu, 21 Apr 2022 16:50:52 +0100 Subject: [PATCH] check name length --- dero_ns_cli.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dero_ns_cli.pl b/dero_ns_cli.pl index 64ff615..081dc31 100755 --- a/dero_ns_cli.pl +++ b/dero_ns_cli.pl @@ -219,6 +219,11 @@ sub check_name { my $name = shift; + if (length $name < 6 or length $name >= 64) { + print "Name ($name) not compatible, need to longer than 6 charaters and shorter than 64\n"; + return; + } + # Check if name is registered # curl http://127.0.0.1:40402/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"nametoaddress","params":{"name":"TESTUSERNAME" }}' -H 'Content-Type: application/json'