Allow -'s in node hostname

Also limit it to 253 since that is the maximum hostname length.
This commit is contained in:
Jason Rhinelander 2023-01-06 13:18:28 -04:00
parent 6e7c5be0ea
commit 08c8beee77
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ abstract class NodeListBase with Store {
}
}
static final nodeAddrRE = RegExp('^[0-9a-zA-Z.]+\$');
static final nodeAddrRE = RegExp('^[0-9a-zA-Z.-]{1,253}\$');
static final nodePortRE = RegExp('^[0-9]{1,5}\$');
void validateNodeAddress(String value, AppLocalizations l10n) {