25 lines
591 B
PHP
25 lines
591 B
PHP
<?php
|
|
|
|
$values = nsParseCommonRequirements();
|
|
|
|
if (!($_POST['flag'] >= 0 AND $_POST['flag'] <= 255))
|
|
output(403, 'Wrong value for <code>flag</code>.');
|
|
|
|
if (!(preg_match('/^[a-z0-9]{1,127}$/D', $_POST['tag'])))
|
|
output(403, 'Wrong value for <code>tag</code>.');
|
|
|
|
if (!(preg_match('/^[a-zA-Z0-9 .,;*|#~@=:!?%$+\/\()[\]_-]{1,255}$/D', $_POST['value'])))
|
|
output(403, 'Wrong value for <code>value</code>.');
|
|
|
|
rateLimit();
|
|
|
|
knotcZoneExec($_POST['zone'], [
|
|
$values['domain'],
|
|
$values['ttl'],
|
|
'CAA',
|
|
$_POST['flag'],
|
|
$_POST['tag'],
|
|
$_POST['value']
|
|
]);
|
|
|
|
output(200, _('Modification done.'));
|