Note: This documentation is still in progress, not reviewed properly, and might contain some errors or outdated images. It's intended for the upcoming 4.0.0 release, so configuration settings might be different from previous versions.

Upgrading to v3.9.0

Overview

Version 3.9.0 introduces several significant improvements to Poweradmin, including enhanced security with token validation, flexible UI configuration options, improved record comments functionality, and a more robust logging system. This update also includes a database schema change to support longer content in zone template records.

Upgrade Instructions

  1. Download latest tarball from GitHub
  2. Backup your files and database before proceeding
  3. Replace all files with content from the downloaded archive
  4. Restore your configuration file (inc/config.inc.php) from backup
  5. Update your database schema based on the database system you're using:

MySQL

ALTER TABLE zone_templ_records MODIFY COLUMN content varchar(2048) NOT NULL;

PostgreSQL

ALTER TABLE zone_templ_records ALTER COLUMN content TYPE varchar(2048), ALTER COLUMN content SET NOT NULL;

SQLite

BEGIN;
CREATE TABLE zone_templ_records_new (
    "id"            integer NULL PRIMARY KEY AUTOINCREMENT,
    "zone_templ_id" integer NOT NULL,
    "name"          text    NOT NULL,
    "type"          text    NOT NULL,
    "content"       text(2048) NOT NULL,
    "ttl"           integer NOT NULL,
    "prio"          integer NOT NULL
);

INSERT INTO zone_templ_records_new SELECT * FROM zone_templ_records;
DROP TABLE zone_templ_records;
ALTER TABLE zone_templ_records_new RENAME TO zone_templ_records;
COMMIT;
  1. Add the following new configuration options to your inc/config.inc.php file:
'security' => [
    // ... existing security configuration ...
    'login_token_validation' => true,        // Enable token validation for login form
    'global_token_validation' => true,       // Enable token validation for all forms
],

'interface' => [
    // ... existing interface configuration ...
    'show_record_id' => true,             // Show record ID column in edit mode
    'position_record_form_top' => false,  // Position the "Add record" form at the top of the page
    'position_save_button_top' => false,  // Position the "Save changes" button at the top of the page
    'show_record_comments' => false,      // Show or hide record comments
],

'logging' => [
    // ... existing logging configuration ...
    'type' => 'null',                     // Options: 'null', 'native'
    'level' => 'info',                    // Options: 'debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'
],

'misc' => [
    // ... existing misc configuration ...
    'record_comments_sync' => false,      // Enable bidirectional comment sync between A and PTR records
],

New Features and Improvements

Enhanced Security

  • Added CSRF token validation for login forms to prevent cross-site request forgery attacks
  • Added option to enable token validation for all forms throughout the application
  • Improved security against common web vulnerabilities
  • Enhanced protection against form-based attacks

Flexible UI Configuration

  • Option to show record ID column in edit mode for easier reference
  • Configurable position for record add form (top or bottom of page)
  • Configurable position for save buttons (top or bottom of page)
  • Option to show or hide record comments in the interface
  • Better customization of the user experience for different workflows

Record Comment Management

  • Added support for bidirectional synchronization of comments between A/AAAA and PTR records
  • When enabled, editing a comment on an A/AAAA record automatically updates the corresponding PTR record comment
  • Likewise, editing a PTR record comment updates the associated A/AAAA record comment
  • Improved visibility and management of DNS record documentation

Improved Logging System

  • Implemented a more robust logging system with configurable log types
  • Added support for different log levels (debug, info, notice, warning, error, critical, alert, emergency)
  • Null logger for minimal performance impact when logging is not needed
  • Native logger for more detailed logging capabilities
  • PSR-3 compatible logging interface for better integration with monitoring tools

Database Improvements

  • Expanded zone template record content field to support longer record values (2048 characters)
  • Better support for complex record types like TXT records with lengthy content
  • Improved handling of DNSSEC-related records

Additional Enhancements

  • Various bug fixes and performance improvements
  • Enhanced error handling and user feedback
  • Updated third-party dependencies to latest secure versions
  • Improved browser compatibility

Notes

  • Database schema changes are required for this update - make sure to run the appropriate SQL commands
  • All new configuration options have sensible defaults if not specified
  • The record comments synchronization feature is disabled by default
  • Token validation is enabled by default for better security
  • If you've customized any templates, review them after the upgrade as some interface elements may have changed