Projet

Général

Profil

« Précédent | Suivant » 

Révision 123d8700

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

Does not accept non-ascii characters on IPsec PSK. It fiixes #3931

Voir les différences:

usr/local/www/system_usermanager.php
210 210
	if (($_POST['passwordfld1']) && ($_POST['passwordfld1'] != $_POST['passwordfld2']))
211 211
		$input_errors[] = gettext("The passwords do not match.");
212 212

  
213
	if (isset($_POST['ipsecpsk']) && !preg_match('/^[[:ascii:]]*$/', $_POST['ipsecpsk']))
214
		$input_errors[] = gettext("IPsec Pre-Shared Key contains invalid characters.");
215

  
213 216
	if (isset($id) && $a_user[$id])
214 217
		$oldusername = $a_user[$id]['name'];
215 218
	else
usr/local/www/vpn_ipsec_keys_edit.php
78 78
		$input_errors[] = gettext("A user with this name already exists. Add the key to the user instead.");
79 79
	unset($userids);
80 80
	
81
	if (isset($_POST['psk']) && !preg_match('/^[[:ascii:]]*$/', $_POST['psk']))
82
		$input_errors[] = gettext("Pre-Shared Key contains invalid characters.");
83

  
81 84
	if (!$input_errors && !(isset($id) && $a_secret[$id])) {
82 85
		/* make sure there are no dupes */
83 86
		foreach ($a_secret as $secretent) {

Formats disponibles : Unified diff