[PATCH] fixes #4874: Raise error for hostname
    Amin Vakil 
    info at aminvakil.com
       
    Thu Aug  3 03:04:13 CEST 2023
    
    
  
Current error message is not correct because having underscores in domain names are perfectly valid, although it's not acceptable at host names, so it should be changed to "This is not a valid hostname".
https://www.ietf.org/rfc/rfc1123.txt section 2.1 "Host Names and Numbers"
https://www.rfc-editor.org/rfc/rfc2181#section-11
Signed-off-by: Amin Vakil <info at aminvakil.com>
---
 src/Toolkit.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Toolkit.js b/src/Toolkit.js
index 67200c8..394e24c 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -129,12 +129,12 @@ Ext.apply(Ext.form.field.VTypes, {
     DnsName: function(v) {
 	return Proxmox.Utils.DnsName_match.test(v);
     },
-    DnsNameText: gettext('This is not a valid DNS name'),
+    DnsNameText: gettext('This is not a valid Host name'),
 
     DnsNameOrWildcard: function(v) {
 	return Proxmox.Utils.DnsName_or_Wildcard_match.test(v);
     },
-    DnsNameOrWildcardText: gettext('This is not a valid DNS name'),
+    DnsNameOrWildcardText: gettext('This is not a valid hostname'),
 
     // email regex used by pve-common
     proxmoxMail: function(v) {
-- 
2.41.0
    
    
More information about the pve-devel
mailing list