2022-12-20 20:17:03 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$values = nsParseCommonRequirements();
|
|
|
|
|
|
|
|
if (!($_POST['algo'] === '1' OR $_POST['algo'] === '3' OR $_POST['algo'] === '4'))
|
|
|
|
output(403, 'Wrong value for <code>algo</code>.');
|
|
|
|
|
|
|
|
if (!($_POST['type'] === '2'))
|
|
|
|
output(403, 'Wrong value for <code>type</code>.');
|
|
|
|
|
|
|
|
if (!(preg_match('/^[a-z0-9]{64}$/D', $_POST['fp'])))
|
|
|
|
output(403, 'Wrong value for <code>fp</code>.');
|
|
|
|
|
2023-04-28 13:39:05 +00:00
|
|
|
rateLimit();
|
|
|
|
|
2022-12-20 20:17:03 +00:00
|
|
|
knotcZoneExec($_POST['zone'], [
|
|
|
|
$values['domain'],
|
|
|
|
$values['ttl'],
|
|
|
|
'SSHFP',
|
|
|
|
$_POST['algo'],
|
|
|
|
$_POST['type'],
|
|
|
|
$_POST['fp']
|
|
|
|
]);
|
|
|
|
|
2023-01-21 00:27:52 +00:00
|
|
|
output(200, _('Modification done.'));
|