|
@@ -6,14 +6,14 @@ if (processForm()) {
|
|
if (query('select', 'zones', ['zone' => $_POST['domain']], 'zone') !== [])
|
|
if (query('select', 'zones', ['zone' => $_POST['domain']], 'zone') !== [])
|
|
output(403, 'Cette zone existe déjà sur ce service.');
|
|
output(403, 'Cette zone existe déjà sur ce service.');
|
|
|
|
|
|
- exec(CONF['ns']['kdig_path'] . ' ' . ltrim(strstr($_POST['domain'], '.'), '.') . ' NS +short', $parentAuthoritatives);
|
|
|
|
|
|
+ exec(CONF['dns']['kdig_path'] . ' ' . ltrim(strstr($_POST['domain'], '.'), '.') . ' NS +short', $parentAuthoritatives);
|
|
if ($parentAuthoritatives === [])
|
|
if ($parentAuthoritatives === [])
|
|
output(403, 'Serveurs de noms de la zone parente introuvables');
|
|
output(403, 'Serveurs de noms de la zone parente introuvables');
|
|
foreach ($parentAuthoritatives as $parentAuthoritative)
|
|
foreach ($parentAuthoritatives as $parentAuthoritative)
|
|
checkAbsoluteDomainFormat($parentAuthoritative);
|
|
checkAbsoluteDomainFormat($parentAuthoritative);
|
|
|
|
|
|
- exec(CONF['ns']['kdig_path'] . ' ' . $_POST['domain'] . ' NS @' . $parentAuthoritatives[0] . ' +noidn', $results);
|
|
|
|
- if (preg_match('/^' . preg_quote($_POST['domain'], '/') . '[\t ]+[0-9]{1,8}[\t ]+IN[\t ]+NS[\t ]+(?<salt>[0-9a-f]{8})-(?<hash>[0-9a-f]{32})\._domain-verification\.' . preg_quote(SERVER_NAME, '/') . '$/Dm', implode(LF, $results), $matches) !== 1)
|
|
|
|
|
|
+ exec(CONF['dns']['kdig_path'] . ' ' . $_POST['domain'] . ' NS @' . $parentAuthoritatives[0] . ' +noidn', $results);
|
|
|
|
+ if (preg_match('/^' . preg_quote($_POST['domain'], '/') . '[\t ]+[0-9]{1,8}[\t ]+IN[\t ]+NS[\t ]+(?<salt>[0-9a-f]{8})-(?<hash>[0-9a-f]{32})\._domain-verification\.' . preg_quote(SERVER_NAME, '/') . '\.$/Dm', implode(LF, $results), $matches) !== 1)
|
|
output(403, 'Enregistrement d\'authentification introuvable');
|
|
output(403, 'Enregistrement d\'authentification introuvable');
|
|
|
|
|
|
checkAuthToken($matches['salt'], $matches['hash']);
|
|
checkAuthToken($matches['salt'], $matches['hash']);
|