Rewrite/Refactoring

- add a lot of permission checks:
  zone edits were completely unchecked (after login); only list and creation were
  protected.
- reduce regular expression usage
- don't use user provided names/ids/urls for requests; instead use them
  to search for the zone in the list of all zones.
- rename 'label' to 'name' in template records ('name' is used in all
  other places)
- make 'localhost' default $apisid
- add 'soa_edit' default
- remove gen_pw/pwgen caller; use openssl instead for random password
- fix a lot of bugs (editrecord, TXT quoting, name checking, ...)
- improve record sorting
This commit is contained in:
Stefan Bühler 2014-10-04 11:27:54 +02:00
parent 169983da70
commit 54fb62b471
5 changed files with 625 additions and 312 deletions

View file

@ -4,7 +4,7 @@ $apiuser = ''; # The PowerDNS API username
$apipass = ''; # The PowerDNS API-user password
$apiip = ''; # The IP of the PowerDNS API
$apiport = '8081'; # The port of the PowerDNS API
$apisid = ''; # PowerDNS's :server_id
$apisid = 'localhost'; # PowerDNS's :server_id
$allowzoneadd = FALSE; # Allow normal users to add zones
@ -27,7 +27,7 @@ $templates[] = array(
'owner' => 'username', # Set to 'public' to make it available to all users
'records' => array(
array(
'label' => '',
'name' => '',
'type' => 'MX',
'content' => 'mx2.tuxis.nl',
'priority' => '200')
@ -35,6 +35,7 @@ $templates[] = array(
);
*/
$defaults['soa_edit'] = 'INCEPTION-INCREMENT';
$defaults['soa_edit_api'] = 'INCEPTION-INCREMENT';
$defaults['defaulttype'] = 'Master'; # Choose between 'Native' or 'Master'
$defaults['primaryns'] = 'unconfigured.primaryns'; # The value of the first NS-record