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_dhcp.php
402 402
		if (!$_POST['ddnsdomainkeyname'] || !$_POST['ddnsdomainkeyalgorithm'] || !$_POST['ddnsdomainkey']) {
403 403
			$input_errors[] = gettext("A valid domain key name, algorithm and secret must be specified.");
404 404
		}
405
		if (preg_match('/[^A-Za-z0-9\-_]/', $_POST['ddnsdomainkeyname'])) {
406
			$input_errors[] = gettext("The domain key name may only contain the characters a-z, A-Z, 0-9, '-' and '_'");
405
		if (preg_match('/[^A-Za-z0-9\.\-\_]/', $_POST['ddnsdomainkeyname'])) {
406
			$input_errors[] = gettext("The domain key name may only contain the characters a-z, A-Z, 0-9, '-', '_' and '.'");
407 407
		}
408 408
		if ($_POST['ddnsdomainkey'] && !base64_decode($_POST['ddnsdomainkey'], true)) {
409 409
			$input_errors[] = gettext("The domain key secret must be a Base64 encoded value.");

Also available in: Unified diff