servnest/pg-act/ns/txt.php

18 lines
373 B
PHP
Raw Permalink Normal View History

2023-07-17 19:15:18 +00:00
<?php declare(strict_types=1);
$values = nsParseCommonRequirements();
if (!(preg_match('/^[a-zA-Z0-9 .,;*|#~@=:!?%$+\/\()[\]_-]{5,8192}$/D', $_POST['txt'])))
output(403, 'Wrong value for <code>txt</code>.');
2023-04-28 13:39:05 +00:00
rateLimit();
knotcZoneExec($_POST['zone'], [
$values['domain'],
$values['ttl'],
'TXT',
'"' . $_POST['txt'] . '"'
]);
output(200, _('Modification done.'));