declare(strict_types=1);
This commit is contained in:
parent
3436d0243f
commit
40e67b0c0c
96 changed files with 97 additions and 54 deletions
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
const USERNAME_REGEX = '^.{1,1024}$';
|
const USERNAME_REGEX = '^.{1,1024}$';
|
||||||
const PASSWORD_REGEX = '^(?=.*[\p{Ll}])(?=.*[\p{Lu}])(?=.*[\p{N}]).{8,1024}|.{10,1024}$';
|
const PASSWORD_REGEX = '^(?=.*[\p{Ll}])(?=.*[\p{Lu}])(?=.*[\p{N}]).{8,1024}|.{10,1024}$';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
function output(int $code, string $msg = '', array $logs = [''], array $data = []): never {
|
function output(int $code, string $msg = '', array $logs = [''], array $data = []): never {
|
||||||
http_response_code($code);
|
http_response_code($code);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
function parseZoneFile(string $zone_content, array $types, bool|string $filter_domain = false, bool $filter_include_subdomains = true): array {
|
function parseZoneFile(string $zone_content, array $types, bool|string $filter_domain = false, bool $filter_include_subdomains = true): array {
|
||||||
$parsed_zone_content = [];
|
$parsed_zone_content = [];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
const SUBPATH_REGEX = '^[a-z0-9-]{4,63}$';
|
const SUBPATH_REGEX = '^[a-z0-9-]{4,63}$';
|
||||||
const ED25519_PUBKEY_REGEX = '^[a-zA-Z0-9/+]{68}$';
|
const ED25519_PUBKEY_REGEX = '^[a-zA-Z0-9/+]{68}$';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
const SOA_VALUES = [
|
const SOA_VALUES = [
|
||||||
'ttl' => 10800,
|
'ttl' => 10800,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
const SUBDOMAIN_REGEX = '^(?!\-)(?!..\-\-)[a-z0-9-]{4,63}(?<!\-)$';
|
const SUBDOMAIN_REGEX = '^(?!\-)(?!..\-\-)[a-z0-9-]{4,63}(?<!\-)$';
|
||||||
|
|
||||||
|
|
2
init.php
2
init.php
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
umask(0077);
|
umask(0077);
|
||||||
|
|
||||||
set_error_handler(function ($level, $message, $file = '', $line = 0) {
|
set_error_handler(function ($level, $message, $file = '', $line = 0) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php // Test that the current setup is working
|
<?php declare(strict_types=1);
|
||||||
|
// Test that the current setup is working
|
||||||
|
|
||||||
require __DIR__ . '/../init.php';
|
require __DIR__ . '/../init.php';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
require __DIR__ . '/../init.php';
|
require __DIR__ . '/../init.php';
|
||||||
|
|
||||||
const MAX_TESTING_ACCOUNT_AGE = 86400 * 10;
|
const MAX_TESTING_ACCOUNT_AGE = 86400 * 10;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
require __DIR__ . '/../init.php';
|
require __DIR__ . '/../init.php';
|
||||||
|
|
||||||
foreach (query('select', 'ns-syncs') as $sync) {
|
foreach (query('select', 'ns-syncs') as $sync) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/*
|
/*
|
||||||
RFC 7344: Automating DNSSEC Delegation Trust Maintenance
|
RFC 7344: Automating DNSSEC Delegation Trust Maintenance
|
||||||
RFC 8078: Managing DS Records from the Parent via CDS/CDNSKEY
|
RFC 8078: Managing DS Records from the Parent via CDS/CDNSKEY
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/*
|
/*
|
||||||
RFC 7477: Child-to-Parent Synchronization in DNS
|
RFC 7477: Child-to-Parent Synchronization in DNS
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
define('PAGES', [
|
define('PAGES', [
|
||||||
'index' => [
|
'index' => [
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if ($_SESSION['type'] !== 'testing')
|
if ($_SESSION['type'] !== 'testing')
|
||||||
output(403, _('This account is already approved.'));
|
output(403, _('This account is already approved.'));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
checkPasswordFormat($_POST['password']);
|
checkPasswordFormat($_POST['password']);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
logout();
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
checkPasswordFormat($_POST['new-password']);
|
checkPasswordFormat($_POST['new-password']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if (CONF['common']['services']['auth'] !== 'enabled')
|
if (CONF['common']['services']['auth'] !== 'enabled')
|
||||||
output(403, _('Registrations are currently closed on this installation.'));
|
output(403, _('Registrations are currently closed on this installation.'));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if (checkPassword($_SESSION['id'], $_POST['current-password']) !== true)
|
if (checkPassword($_SESSION['id'], $_POST['current-password']) !== true)
|
||||||
output(403, _('Wrong current password.'));
|
output(403, _('Wrong current password.'));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
checkUsernameFormat($_POST['new-username']);
|
checkUsernameFormat($_POST['new-username']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$_POST['domain'] = formatDomain($_POST['domain']);
|
$_POST['domain'] = formatDomain($_POST['domain']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if (dirsStatuses('onion')[$_POST['dir']] !== false)
|
if (dirsStatuses('onion')[$_POST['dir']] !== false)
|
||||||
output(403, 'Wrong value for <code>dir</code>.');
|
output(403, 'Wrong value for <code>dir</code>.');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if (dirsStatuses('subdomain')[$_POST['dir']] !== false)
|
if (dirsStatuses('subdomain')[$_POST['dir']] !== false)
|
||||||
output(403, 'Wrong value for <code>dir</code>.');
|
output(403, 'Wrong value for <code>dir</code>.');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if (dirsStatuses('subpath')[$_POST['dir']] !== false)
|
if (dirsStatuses('subpath')[$_POST['dir']] !== false)
|
||||||
output(403, 'Wrong value for <code>dir</code>.');
|
output(403, 'Wrong value for <code>dir</code>.');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if (preg_match('/^(?<type>subpath|subdomain|onion|dns):(?<address>[a-z0-9._-]{1,256})$/D', $_POST['site'], $site) !== 1)
|
if (preg_match('/^(?<type>subpath|subdomain|onion|dns):(?<address>[a-z0-9._-]{1,256})$/D', $_POST['site'], $site) !== 1)
|
||||||
output(403, 'Malformed value for <code>site</code>.');
|
output(403, 'Malformed value for <code>site</code>.');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$el_nb = count($_POST['keys']);
|
$el_nb = count($_POST['keys']);
|
||||||
if ($el_nb < 1 OR $el_nb > 8)
|
if ($el_nb < 1 OR $el_nb > 8)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
nsCheckZonePossession($_POST['zone']);
|
nsCheckZonePossession($_POST['zone']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
nsCheckZonePossession($_POST['zone']);
|
nsCheckZonePossession($_POST['zone']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$el_nb = count($_POST['syncs']);
|
$el_nb = count($_POST['syncs']);
|
||||||
if ($el_nb < 1 OR $el_nb > 8)
|
if ($el_nb < 1 OR $el_nb > 8)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$values = nsParseCommonRequirements();
|
$values = nsParseCommonRequirements();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$_POST['domain'] = formatAbsoluteDomain($_POST['domain']);
|
$_POST['domain'] = formatAbsoluteDomain($_POST['domain']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
nsCheckZonePossession($_POST['zone']);
|
nsCheckZonePossession($_POST['zone']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if (!in_array($_POST['algo'], ['8', '13', '14', '15', '16'], true))
|
if (!in_array($_POST['algo'], ['8', '13', '14', '15', '16'], true))
|
||||||
output(403, 'Wrong value for <code>algo</code>.');
|
output(403, 'Wrong value for <code>algo</code>.');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
regCheckDomainPossession($_POST['domain']);
|
regCheckDomainPossession($_POST['domain']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
regCheckDomainPossession($_POST['domain']);
|
regCheckDomainPossession($_POST['domain']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
regCheckDomainPossession($_POST['domain']);
|
regCheckDomainPossession($_POST['domain']);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if (preg_match('/' . SUBDOMAIN_REGEX . '/D', $_POST['subdomain']) !== 1)
|
if (preg_match('/' . SUBDOMAIN_REGEX . '/D', $_POST['subdomain']) !== 1)
|
||||||
output(403, _('This format of subdomain is not allowed.'));
|
output(403, _('This format of subdomain is not allowed.'));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
if (preg_match('/' . SUBDOMAIN_REGEX . '/D', $_POST['subdomain']) !== 1)
|
if (preg_match('/' . SUBDOMAIN_REGEX . '/D', $_POST['subdomain']) !== 1)
|
||||||
output(403, _('This format of subdomain is not allowed.'));
|
output(403, _('This format of subdomain is not allowed.'));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
regCheckDomainPossession($_POST['domain']);
|
regCheckDomainPossession($_POST['domain']);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= _('This form allows to use an approval key to validate your account. Approval keys are distributed by an administrator upon request.') ?>
|
<?= _('This form allows to use an approval key to validate your account. Approval keys are distributed by an administrator upon request.') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<?php displayIndex(); ?>
|
<?php displayIndex(); ?>
|
||||||
|
|
||||||
<h2 id="type"><?= _('Account type') ?></h2>
|
<h2 id="type"><?= _('Account type') ?></h2>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p><?= _('New?') ?> <a href="register"><?= _('Create an account') ?></a></p>
|
<p><?= _('New?') ?> <a href="register"><?= _('Create an account') ?></a></p>
|
||||||
|
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
logout();
|
logout();
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<label for="current-password"><?= _('Current password') ?></label><br>
|
<label for="current-password"><?= _('Current password') ?></label><br>
|
||||||
<input required="" autocomplete="current-password" minlength="8" maxlength="1024" pattern="<?= PASSWORD_REGEX ?>" id="current-password" name="current-password" type="password" placeholder="<?= PLACEHOLDER_PASSWORD ?>"><br>
|
<input required="" autocomplete="current-password" minlength="8" maxlength="1024" pattern="<?= PASSWORD_REGEX ?>" id="current-password" name="current-password" type="password" placeholder="<?= PLACEHOLDER_PASSWORD ?>"><br>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p><?= _('Already have an account?') ?> <a href="login"><?= _('Log in') ?></a></p>
|
<p><?= _('Already have an account?') ?> <a href="login"><?= _('Log in') ?></a></p>
|
||||||
|
|
||||||
<?= (CONF['common']['services']['auth'] !== 'enabled') ? '<p><strong>' . _('Registrations are currently closed on this installation.') . '</strong></p>' : '' ?>
|
<?= (CONF['common']['services']['auth'] !== 'enabled') ? '<p><strong>' . _('Registrations are currently closed on this installation.') . '</strong></p>' : '' ?>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= _('This will delete every resource managed by the current account, including registered domains, hosted DNS records, websites files and cryptographic keys for Onion services and DNSSEC.') ?>
|
<?= _('This will delete every resource managed by the current account, including registered domains, hosted DNS records, websites files and cryptographic keys for Onion services and DNSSEC.') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<label for="current-password"><?= _('Current password') ?></label><br>
|
<label for="current-password"><?= _('Current password') ?></label><br>
|
||||||
<input required="" autocomplete="current-password" minlength="8" maxlength="1024" pattern="<?= PASSWORD_REGEX ?>" id="current-password" name="current-password" type="password" placeholder="<?= PLACEHOLDER_PASSWORD ?>"><br>
|
<input required="" autocomplete="current-password" minlength="8" maxlength="1024" pattern="<?= PASSWORD_REGEX ?>" id="current-password" name="current-password" type="password" placeholder="<?= PLACEHOLDER_PASSWORD ?>"><br>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= _('A Let\'s Encrypt certificate will be obtained.') ?>
|
<?= _('A Let\'s Encrypt certificate will be obtained.') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<label for="dir"><?= _('Target directory') ?></label><br>
|
<label for="dir"><?= _('Target directory') ?></label><br>
|
||||||
<select required="" name="dir" id="dir">
|
<select required="" name="dir" id="dir">
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= sprintf(_('The subdomain can only contain %1$s, %2$s and %3$s, and must be between 4 and 63 characters. It can\'t have an hyphen (%3$s) in first, last or both third and fourth position.'), '<abbr title="abcdefghijklmnopqrstuvwxyz"><code>a</code>-<code>z</code></abbr>', '<abbr title="0123456789"><code>0</code>-<code>9</code></abbr>', '<code>-</code>') ?>
|
<?= sprintf(_('The subdomain can only contain %1$s, %2$s and %3$s, and must be between 4 and 63 characters. It can\'t have an hyphen (%3$s) in first, last or both third and fourth position.'), '<abbr title="abcdefghijklmnopqrstuvwxyz"><code>a</code>-<code>z</code></abbr>', '<abbr title="0123456789"><code>0</code>-<code>9</code></abbr>', '<code>-</code>') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= sprintf(_('The path can only contain %1$s, %2$s and %3$s, and must be between 4 and 63 characters.'), '<abbr title="abcdefghijklmnopqrstuvwxyz"><code>a</code>-<code>z</code></abbr>', '<abbr title="0123456789"><code>0</code>-<code>9</code></abbr>', '<code>-</code>') ?>
|
<?= sprintf(_('The path can only contain %1$s, %2$s and %3$s, and must be between 4 and 63 characters.'), '<abbr title="abcdefghijklmnopqrstuvwxyz"><code>a</code>-<code>z</code></abbr>', '<abbr title="0123456789"><code>0</code>-<code>9</code></abbr>', '<code>-</code>') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<label for="site"><?= _('Access to delete') ?></label><br>
|
<label for="site"><?= _('Access to delete') ?></label><br>
|
||||||
<select required="" name="site" id="site">
|
<select required="" name="site" id="site">
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= _('This service allows you to send files on the server using SFTP, and to make them publicly available with HTTP.') ?>
|
<?= _('This service allows you to send files on the server using SFTP, and to make them publicly available with HTTP.') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= _('In addition to your password, you can also access your SFTP space using Ed25519 SSH keys. A key can be granted modification rights to the full space (<code>/</code>) or to any arbitrary subdirectory. A key is always allowed to list any directory content.') ?>
|
<?= _('In addition to your password, you can also access your SFTP space using Ed25519 SSH keys. A key can be granted modification rights to the full space (<code>/</code>) or to any arbitrary subdirectory. A key is always allowed to list any directory content.') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<nav>
|
<nav>
|
||||||
<p>
|
<p>
|
||||||
<span aria-hidden="true">➡️ </span><em><a href="<?= CONF['common']['about_url'] ?>"><?= _('About this installation') ?></a></em>
|
<span aria-hidden="true">➡️ </span><em><a href="<?= CONF['common']['about_url'] ?>"><?= _('About this installation') ?></a></em>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
<label for="flag"><?= _('Flag') ?></label>
|
<label for="flag"><?= _('Flag') ?></label>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
<label for="cname"><?= _('Canonical name') ?></label>
|
<label for="cname"><?= _('Canonical name') ?></label>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
<label for="dname"><?= _('Delegation name') ?></label>
|
<label for="dname"><?= _('Delegation name') ?></label>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<label for="zone"><?= _('Zone to be changed') ?></label>
|
<label for="zone"><?= _('Zone to be changed') ?></label>
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<label for="action"><?= _('Action') ?></label>
|
<label for="action"><?= _('Action') ?></label>
|
||||||
<select name="action" id="action">
|
<select name="action" id="action">
|
||||||
<option value="add"<?= ($_POST['action'] ?? NULL) === 'add' ? ' selected=""' : '' ?>><?= _('Add') ?></option>
|
<option value="add"<?= ($_POST['action'] ?? NULL) === 'add' ? ' selected=""' : '' ?>><?= _('Add') ?></option>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= _('This service allows to host and manage DNS records inside a DNS zone.') ?>
|
<?= _('This service allows to host and manage DNS records inside a DNS zone.') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
<label for="ip"><?= _('IP address') ?></label><br>
|
<label for="ip"><?= _('IP address') ?></label><br>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
<label for="priority"><?= _('Priority') ?></label>
|
<label for="priority"><?= _('Priority') ?></label>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
<label for="ns"><?= _('Name server') ?></label>
|
<label for="ns"><?= _('Name server') ?></label>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<input type="radio" name="print" id="table" value="table" checked="">
|
<input type="radio" name="print" id="table" value="table" checked="">
|
||||||
<label for="table"><?= _('Records table') ?></label>
|
<label for="table"><?= _('Records table') ?></label>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= sprintf(_('AAAA, A and CAA records are regularly copied from the source domain to the target domain. Their TTLs are set to %s seconds.'), SYNC_TTL) ?>
|
<?= sprintf(_('AAAA, A and CAA records are regularly copied from the source domain to the target domain. Their TTLs are set to %s seconds.'), SYNC_TTL) ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
|
||||||
<label for="txt"><?= _('Text') ?></label>
|
<label for="txt"><?= _('Text') ?></label>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= sprintf(_('To prove that you own this domain, it must have a NS record equal to %s when the form is being processed.'), '<code>' . getAuthToken() . '._domain-verification.' . SERVER_NAME . '.</code>') ?>
|
<?= sprintf(_('To prove that you own this domain, it must have a NS record equal to %s when the form is being processed.'), '<code>' . getAuthToken() . '._domain-verification.' . SERVER_NAME . '.</code>') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<label for="zone"><?= _('Zone') ?></label>
|
<label for="zone"><?= _('Zone') ?></label>
|
||||||
<select required="" name="zone" id="zone">
|
<select required="" name="zone" id="zone">
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/reg/select-action.inc.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/reg/select-action.inc.php'; ?>
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/reg/select-action.inc.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/reg/select-action.inc.php'; ?>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= sprintf(_('This domain name registry allows to register domains ending with <code>%1$s</code>, for instance <code><em>domain</em>%1$s</code>.'), '.' . key(CONF['reg']['suffixes'])) ?>
|
<?= sprintf(_('This domain name registry allows to register domains ending with <code>%1$s</code>, for instance <code><em>domain</em>%1$s</code>.'), '.' . key(CONF['reg']['suffixes'])) ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/reg/select-action.inc.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/reg/select-action.inc.php'; ?>
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php require ROOT_PATH . '/pg-view/reg/select-domain.inc.php'; ?>
|
<?php require ROOT_PATH . '/pg-view/reg/select-domain.inc.php'; ?>
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= _('Register a new domain on your account.') ?>
|
<?= _('Register a new domain on your account.') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<label for="action"><?= _('Action') ?></label>
|
<label for="action"><?= _('Action') ?></label>
|
||||||
<select name="action" id="action">
|
<select name="action" id="action">
|
||||||
<option value="add"<?= ($_POST['action'] ?? NULL) === 'add' ? ' selected=""' : '' ?>><?= _('Add') ?></option>
|
<option value="add"<?= ($_POST['action'] ?? NULL) === 'add' ? ' selected=""' : '' ?>><?= _('Add') ?></option>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<label for="domain"><?= _('Domain') ?></label>
|
<label for="domain"><?= _('Domain') ?></label>
|
||||||
<br>
|
<br>
|
||||||
<select required="" name="domain" id="domain">
|
<select required="" name="domain" id="domain">
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= sprintf(_('To prove that you are allowed to receive the domain by its current owner, the domain must have an NS record equal to %s when the form is being processed. The NS record will be automatically deleted once validated.'), '<code>' . getAuthToken() . '._transfer-verification.' . SERVER_NAME . '.</code>') ?>
|
<?= sprintf(_('To prove that you are allowed to receive the domain by its current owner, the domain must have an NS record equal to %s when the form is being processed. The NS record will be automatically deleted once validated.'), '<code>' . getAuthToken() . '._transfer-verification.' . SERVER_NAME . '.</code>') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<p>
|
<p>
|
||||||
<?= _('This will unregister the domain, making it registerable by anyone again (after a delay of 1 year plus half the registration period, with a maximum of 8 years).') ?>
|
<?= _('This will unregister the domain, making it registerable by anyone again (after a delay of 1 year plus half the registration period, with a maximum of 8 years).') ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
require 'init.php';
|
require 'init.php';
|
||||||
|
|
||||||
$pageAddress = substr($_SERVER['REQUEST_URI'], strlen(CONF['common']['prefix']) + 1);
|
$pageAddress = substr($_SERVER['REQUEST_URI'], strlen(CONF['common']['prefix']) + 1);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php // ServNest authenticator for SFTPGo https://github.com/drakkan/sftpgo/blob/main/docs/external-auth.md
|
<?php declare(strict_types=1);
|
||||||
|
// ServNest authenticator for SFTPGo https://github.com/drakkan/sftpgo/blob/main/docs/external-auth.md
|
||||||
|
|
||||||
const DEBUG = false;
|
const DEBUG = false;
|
||||||
!DEBUG or ob_start();
|
!DEBUG or ob_start();
|
||||||
|
|
1
view.php
1
view.php
|
@ -1,3 +1,4 @@
|
||||||
|
<?php declare(strict_types=1); ?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<?= LOCALE ?>"<?= empty(SERVICE) ? '' : ' class="' . SERVICE . '"' ?>>
|
<html lang="<?= LOCALE ?>"<?= empty(SERVICE) ? '' : ' class="' . SERVICE . '"' ?>>
|
||||||
<head>
|
<head>
|
||||||
|
|
Loading…
Reference in a new issue