Project

General

Profile

« Previous | Next » 

Revision 07588052

Added by Viktor Gurov almost 5 years ago

DHCP service DDNS key name RFC2845 compat. Fixes #10844

View differences:

src/usr/local/www/services_dhcpv6.php
324 324
		if (!$_POST['ddnsdomainkeyname'] || !$_POST['ddnsdomainkeyalgorithm'] || !$_POST['ddnsdomainkey']) {
325 325
			$input_errors[] = gettext("A valid domain key name, algorithm and secret must be specified.");
326 326
		}
327
		if (preg_match('/[^A-Za-z0-9\-_]/', $_POST['ddnsdomainkeyname'])) {
328
			$input_errors[] = gettext("The domain key name may only contain the characters a-z, A-Z, 0-9, '-' and '_'");
327
		if (preg_match('/[^A-Za-z0-9\.\-\_]/', $_POST['ddnsdomainkeyname'])) {
328
			$input_errors[] = gettext("The domain key name may only contain the characters a-z, A-Z, 0-9, '-', '_' and '.'");
329 329
		}
330 330
		if ($_POST['ddnsdomainkey'] && !base64_decode($_POST['ddnsdomainkey'], true)) {
331 331
			$input_errors[] = gettext("The domain key secret must be a Base64 encoded value.");

Also available in: Unified diff