servnest/pg-act/ns/caa.php

24 lines
547 B
PHP
Raw Normal View History

<?php
$values = nsParseCommonRequirements();
if (!($_POST['flag'] >= 0 AND $_POST['flag'] <= 255))
output(403, 'Wrong value for <code>flag</code>.');
if (!(preg_match('/^[a-z]{1,127}$/D', $_POST['tag'])))
output(403, 'Wrong value for <code>tag</code>.');
if (!(preg_match('/^[a-z0-9.-]{1,255}$/D', $_POST['value'])))
output(403, 'Wrong value for <code>value</code>.');
knotcZoneExec($_POST['zone'], [
$values['domain'],
$values['ttl'],
'CAA',
$_POST['flag'],
$_POST['tag'],
$_POST['value']
]);
output(200, _('Modification done.'));