Projet

Général

Profil

« Précédent | Suivant » 

Révision 9ec8e1f2

Ajouté par Renato Botelho il y a plus de 9 ans

Allow hostname to start with '@.' for namecheap. It fixes #3568

Voir les différences:

usr/local/www/services_dyndns_edit.php
106 106

  
107 107
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
108 108

  
109
	if (($_POST['host'] && !is_domain($_POST['host'])))
110
		$input_errors[] = gettext("The Hostname contains invalid characters.");
109
	if (isset($_POST['host'])) {
110
		/* Namecheap can have a @. in hostname */
111
		if ($pconfig['type'] == "namecheap" && substr($_POST['host'], 0, 2) == '@.')
112
			$host_to_check = substr($_POST['host'], 2);
113
		else
114
			$host_to_check = $_POST['host'];
115

  
116
		if (!is_domain($host_to_check))
117
			$input_errors[] = gettext("The Hostname contains invalid characters.");
118

  
119
		unset($host_to_check);
120
	}
111 121
	if (($_POST['mx'] && !is_domain($_POST['mx']))) 
112 122
		$input_errors[] = gettext("The MX contains invalid characters.");
113 123
	if ((in_array("username", $reqdfields) && $_POST['username'] && !is_dyndns_username($_POST['username'])) || ((in_array("username", $reqdfields)) && ($_POST['username'] == ""))) 

Formats disponibles : Unified diff