2023-07-17 19:15:18 +00:00
|
|
|
<?php declare(strict_types=1);
|
2022-12-20 20:17:03 +00:00
|
|
|
|
|
|
|
$values = nsParseCommonRequirements();
|
|
|
|
|
2023-05-05 17:41:55 +00:00
|
|
|
if (!(preg_match('/^[a-zA-Z0-9 .,;*|#~@=:!?%$+\/\()[\]_-]{5,8192}$/D', $_POST['txt'])))
|
2022-12-20 20:17:03 +00:00
|
|
|
output(403, 'Wrong value for <code>txt</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'],
|
|
|
|
'TXT',
|
|
|
|
'"' . $_POST['txt'] . '"'
|
|
|
|
]);
|
|
|
|
|
2023-01-21 00:27:52 +00:00
|
|
|
output(200, _('Modification done.'));
|