From 70b098a2b034da426cc94e7a9a8c7a95551c227a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 19 Jun 2017 03:02:41 -0400 Subject: [PATCH] Increate the maximum allowed length of a hostname. The hostname madagascarsteenplaatschildpad (.uva.nl) doesn't fit in 24, and hostname(1) accepts up to 64 characters. The RFCs vary, but 63 + terminating NUL or length-octet + data maximum 64 bytes seen to be the common ground. FIXES #514 --- src/modules/users/UsersPage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/users/UsersPage.h b/src/modules/users/UsersPage.h index 632d49471..3445a4207 100644 --- a/src/modules/users/UsersPage.h +++ b/src/modules/users/UsersPage.h @@ -68,7 +68,7 @@ private: const QRegExp HOSTNAME_RX = QRegExp( "^[a-zA-Z0-9][-a-zA-Z0-9_]*$" ); const int USERNAME_MAX_LENGTH = 31; const int HOSTNAME_MIN_LENGTH = 2; - const int HOSTNAME_MAX_LENGTH = 24; + const int HOSTNAME_MAX_LENGTH = 63; bool m_readyFullName; bool m_readyUsername;