15 lines
337 B
PHP
15 lines
337 B
PHP
<?php
|
|
|
|
$values = nsParseCommonRequirements();
|
|
|
|
if (!(preg_match('/^[a-zA-Z0-9 .@=:!%$+\/\()[\]_-]{5,8192}$/D', $_POST['txt'])))
|
|
output(403, 'Wrong value for <code>txt</code>.');
|
|
|
|
knotcZoneExec($_POST['zone'], [
|
|
$values['domain'],
|
|
$values['ttl'],
|
|
'TXT',
|
|
'"' . $_POST['txt'] . '"'
|
|
]);
|
|
|
|
output(200, 'Enregistrement ajouté/retiré.');
|