Pārlūkot izejas kodu

declare(strict_types=1);

Miraty 1 gadu atpakaļ
vecāks
revīzija
40e67b0c0c
96 mainītis faili ar 97 papildinājumiem un 54 dzēšanām
  1. 1 1
      fn/auth.php
  2. 1 1
      fn/common.php
  3. 1 1
      fn/dns.php
  4. 1 1
      fn/ht.php
  5. 1 1
      fn/ns.php
  6. 1 1
      fn/reg.php
  7. 1 1
      init.php
  8. 2 1
      jobs/check.php
  9. 1 1
      jobs/delete-old-testing.php
  10. 1 1
      jobs/ns-sync.php
  11. 1 1
      jobs/reg-cds.php
  12. 1 1
      jobs/reg-csync.php
  13. 1 1
      pages.php
  14. 1 1
      pg-act/auth/approval.php
  15. 1 1
      pg-act/auth/login.php
  16. 0 3
      pg-act/auth/logout.php
  17. 1 1
      pg-act/auth/password.php
  18. 1 1
      pg-act/auth/register.php
  19. 1 1
      pg-act/auth/unregister.php
  20. 1 1
      pg-act/auth/username.php
  21. 1 1
      pg-act/ht/add-dns.php
  22. 1 1
      pg-act/ht/add-onion.php
  23. 1 1
      pg-act/ht/add-subdomain.php
  24. 1 1
      pg-act/ht/add-subpath.php
  25. 1 1
      pg-act/ht/del.php
  26. 1 1
      pg-act/ht/keys.php
  27. 1 1
      pg-act/ns/caa.php
  28. 1 1
      pg-act/ns/cname.php
  29. 1 1
      pg-act/ns/dname.php
  30. 1 1
      pg-act/ns/edit.php
  31. 1 1
      pg-act/ns/ip.php
  32. 1 1
      pg-act/ns/loc.php
  33. 1 1
      pg-act/ns/mx.php
  34. 1 1
      pg-act/ns/ns.php
  35. 1 1
      pg-act/ns/print.php
  36. 1 1
      pg-act/ns/srv.php
  37. 1 1
      pg-act/ns/sshfp.php
  38. 1 1
      pg-act/ns/sync.php
  39. 1 1
      pg-act/ns/tlsa.php
  40. 1 1
      pg-act/ns/txt.php
  41. 1 1
      pg-act/ns/zone-add.php
  42. 1 1
      pg-act/ns/zone-del.php
  43. 1 1
      pg-act/reg/ds.php
  44. 1 1
      pg-act/reg/glue.php
  45. 1 1
      pg-act/reg/ns.php
  46. 1 1
      pg-act/reg/print.php
  47. 1 1
      pg-act/reg/register.php
  48. 1 1
      pg-act/reg/transfer.php
  49. 1 1
      pg-act/reg/unregister.php
  50. 1 0
      pg-view/auth/approval.php
  51. 1 0
      pg-view/auth/index.php
  52. 1 0
      pg-view/auth/login.php
  53. 1 1
      pg-view/auth/logout.php
  54. 1 0
      pg-view/auth/password.php
  55. 1 0
      pg-view/auth/register.php
  56. 1 0
      pg-view/auth/unregister.php
  57. 1 0
      pg-view/auth/username.php
  58. 1 0
      pg-view/ht/add-dns.php
  59. 1 0
      pg-view/ht/add-onion.php
  60. 1 0
      pg-view/ht/add-subdomain.php
  61. 1 0
      pg-view/ht/add-subpath.php
  62. 1 0
      pg-view/ht/del.php
  63. 1 0
      pg-view/ht/index.php
  64. 1 0
      pg-view/ht/keys.php
  65. 1 0
      pg-view/index.php
  66. 1 0
      pg-view/ns/caa.php
  67. 1 0
      pg-view/ns/cname.php
  68. 1 0
      pg-view/ns/dname.php
  69. 1 0
      pg-view/ns/edit.php
  70. 1 0
      pg-view/ns/form.ns.php
  71. 1 0
      pg-view/ns/index.php
  72. 1 0
      pg-view/ns/ip.php
  73. 1 0
      pg-view/ns/loc.php
  74. 1 0
      pg-view/ns/mx.php
  75. 1 0
      pg-view/ns/ns.php
  76. 1 0
      pg-view/ns/print.php
  77. 1 0
      pg-view/ns/srv.php
  78. 1 0
      pg-view/ns/sshfp.php
  79. 1 0
      pg-view/ns/sync.php
  80. 1 0
      pg-view/ns/tlsa.php
  81. 1 0
      pg-view/ns/txt.php
  82. 1 0
      pg-view/ns/zone-add.php
  83. 1 0
      pg-view/ns/zone-del.php
  84. 1 0
      pg-view/reg/ds.php
  85. 1 0
      pg-view/reg/glue.php
  86. 1 0
      pg-view/reg/index.php
  87. 1 0
      pg-view/reg/ns.php
  88. 1 0
      pg-view/reg/print.php
  89. 1 0
      pg-view/reg/register.php
  90. 1 0
      pg-view/reg/select-action.inc.php
  91. 1 0
      pg-view/reg/select-domain.inc.php
  92. 1 0
      pg-view/reg/transfer.php
  93. 1 0
      pg-view/reg/unregister.php
  94. 1 1
      router.php
  95. 2 1
      sftpgo-auth.php
  96. 1 0
      view.php

+ 1 - 1
fn/auth.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 const USERNAME_REGEX = '^.{1,1024}$';
 const PASSWORD_REGEX = '^(?=.*[\p{Ll}])(?=.*[\p{Lu}])(?=.*[\p{N}]).{8,1024}|.{10,1024}$';

+ 1 - 1
fn/common.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 function output(int $code, string $msg = '', array $logs = [''], array $data = []): never {
 	http_response_code($code);

+ 1 - 1
fn/dns.php

@@ -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 {
 	$parsed_zone_content = [];

+ 1 - 1
fn/ht.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 const SUBPATH_REGEX = '^[a-z0-9-]{4,63}$';
 const ED25519_PUBKEY_REGEX = '^[a-zA-Z0-9/+]{68}$';

+ 1 - 1
fn/ns.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 const SOA_VALUES = [
 	'ttl' => 10800,

+ 1 - 1
fn/reg.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 const SUBDOMAIN_REGEX = '^(?!\-)(?!..\-\-)[a-z0-9-]{4,63}(?<!\-)$';
 

+ 1 - 1
init.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 umask(0077);
 
 set_error_handler(function ($level, $message, $file = '', $line = 0) {

+ 2 - 1
jobs/check.php

@@ -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';
 

+ 1 - 1
jobs/delete-old-testing.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 require __DIR__ . '/../init.php';
 
 const MAX_TESTING_ACCOUNT_AGE = 86400 * 10;

+ 1 - 1
jobs/ns-sync.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 require __DIR__ . '/../init.php';
 
 foreach (query('select', 'ns-syncs') as $sync) {

+ 1 - 1
jobs/reg-cds.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 /*
 	RFC 7344: Automating DNSSEC Delegation Trust Maintenance
 	RFC 8078: Managing DS Records from the Parent via CDS/CDNSKEY

+ 1 - 1
jobs/reg-csync.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 /*
 	RFC 7477: Child-to-Parent Synchronization in DNS
 */

+ 1 - 1
pages.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 define('PAGES', [
 	'index' => [

+ 1 - 1
pg-act/auth/approval.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 if ($_SESSION['type'] !== 'testing')
 	output(403, _('This account is already approved.'));

+ 1 - 1
pg-act/auth/login.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 checkPasswordFormat($_POST['password']);
 

+ 0 - 3
pg-act/auth/logout.php

@@ -1,3 +0,0 @@
-<?php
-
-logout();

+ 1 - 1
pg-act/auth/password.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 checkPasswordFormat($_POST['new-password']);
 

+ 1 - 1
pg-act/auth/register.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 if (CONF['common']['services']['auth'] !== 'enabled')
 	output(403, _('Registrations are currently closed on this installation.'));

+ 1 - 1
pg-act/auth/unregister.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 if (checkPassword($_SESSION['id'], $_POST['current-password']) !== true)
 	output(403, _('Wrong current password.'));

+ 1 - 1
pg-act/auth/username.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 checkUsernameFormat($_POST['new-username']);
 

+ 1 - 1
pg-act/ht/add-dns.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $_POST['domain'] = formatDomain($_POST['domain']);
 

+ 1 - 1
pg-act/ht/add-onion.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 if (dirsStatuses('onion')[$_POST['dir']] !== false)
 	output(403, 'Wrong value for <code>dir</code>.');

+ 1 - 1
pg-act/ht/add-subdomain.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 if (dirsStatuses('subdomain')[$_POST['dir']] !== false)
 	output(403, 'Wrong value for <code>dir</code>.');

+ 1 - 1
pg-act/ht/add-subpath.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 if (dirsStatuses('subpath')[$_POST['dir']] !== false)
 	output(403, 'Wrong value for <code>dir</code>.');

+ 1 - 1
pg-act/ht/del.php

@@ -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)
 	output(403, 'Malformed value for <code>site</code>.');

+ 1 - 1
pg-act/ht/keys.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $el_nb = count($_POST['keys']);
 if ($el_nb < 1 OR $el_nb > 8)

+ 1 - 1
pg-act/ns/caa.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/cname.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/dname.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/edit.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 nsCheckZonePossession($_POST['zone']);
 

+ 1 - 1
pg-act/ns/ip.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/loc.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/mx.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/ns.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/print.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 nsCheckZonePossession($_POST['zone']);
 

+ 1 - 1
pg-act/ns/srv.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/sshfp.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/sync.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $el_nb = count($_POST['syncs']);
 if ($el_nb < 1 OR $el_nb > 8)

+ 1 - 1
pg-act/ns/tlsa.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/txt.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $values = nsParseCommonRequirements();
 

+ 1 - 1
pg-act/ns/zone-add.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 $_POST['domain'] = formatAbsoluteDomain($_POST['domain']);
 

+ 1 - 1
pg-act/ns/zone-del.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 nsCheckZonePossession($_POST['zone']);
 

+ 1 - 1
pg-act/reg/ds.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 if (!in_array($_POST['algo'], ['8', '13', '14', '15', '16'], true))
 	output(403, 'Wrong value for <code>algo</code>.');

+ 1 - 1
pg-act/reg/glue.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 regCheckDomainPossession($_POST['domain']);
 

+ 1 - 1
pg-act/reg/ns.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 regCheckDomainPossession($_POST['domain']);
 

+ 1 - 1
pg-act/reg/print.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 regCheckDomainPossession($_POST['domain']);
 

+ 1 - 1
pg-act/reg/register.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 if (preg_match('/' . SUBDOMAIN_REGEX . '/D', $_POST['subdomain']) !== 1)
 	output(403, _('This format of subdomain is not allowed.'));

+ 1 - 1
pg-act/reg/transfer.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 if (preg_match('/' . SUBDOMAIN_REGEX . '/D', $_POST['subdomain']) !== 1)
 	output(403, _('This format of subdomain is not allowed.'));

+ 1 - 1
pg-act/reg/unregister.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 
 regCheckDomainPossession($_POST['domain']);
 

+ 1 - 0
pg-view/auth/approval.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <p>
 	<?= _('This form allows to use an approval key to validate your account. Approval keys are distributed by an administrator upon request.') ?>
 </p>

+ 1 - 0
pg-view/auth/index.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <?php displayIndex(); ?>
 
 <h2 id="type"><?= _('Account type') ?></h2>

+ 1 - 0
pg-view/auth/login.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <p><?= _('New?') ?> <a href="register"><?= _('Create an account') ?></a></p>
 
 <form method="post">

+ 1 - 1
pg-view/auth/logout.php

@@ -1,3 +1,3 @@
-<?php
+<?php declare(strict_types=1);
 
 logout();

+ 1 - 0
pg-view/auth/password.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 	<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>

+ 1 - 0
pg-view/auth/register.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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>' : '' ?>

+ 1 - 0
pg-view/auth/unregister.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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.') ?>
 </p>

+ 1 - 0
pg-view/auth/username.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 	<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>

+ 1 - 0
pg-view/ht/add-dns.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <p>
 	<?= _('A Let\'s Encrypt certificate will be obtained.') ?>
 </p>

+ 1 - 0
pg-view/ht/add-onion.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 	<label for="dir"><?= _('Target directory') ?></label><br>
 	<select required="" name="dir" id="dir">

+ 1 - 0
pg-view/ht/add-subdomain.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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>') ?>
 </p>

+ 1 - 0
pg-view/ht/add-subpath.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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>') ?>
 </p>

+ 1 - 0
pg-view/ht/del.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 	<label for="site"><?= _('Access to delete') ?></label><br>
 	<select required="" name="site" id="site">

+ 1 - 0
pg-view/ht/index.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <p>
 	<?= _('This service allows you to send files on the server using SFTP, and to make them publicly available with HTTP.') ?>
 </p>

+ 1 - 0
pg-view/ht/keys.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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.') ?>
 </p>

+ 1 - 0
pg-view/index.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <nav>
 	<p>
 		<span aria-hidden="true">➡️ </span><em><a href="<?= CONF['common']['about_url'] ?>"><?= _('About this installation') ?></a></em>

+ 1 - 0
pg-view/ns/caa.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 	<label for="flag"><?= _('Flag') ?></label>

+ 1 - 0
pg-view/ns/cname.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 	<label for="cname"><?= _('Canonical name') ?></label>

+ 1 - 0
pg-view/ns/dname.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 	<label for="dname"><?= _('Delegation name') ?></label>

+ 1 - 0
pg-view/ns/edit.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 	<label for="zone"><?= _('Zone to be changed') ?></label>
 	<br>

+ 1 - 0
pg-view/ns/form.ns.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 	<label for="action"><?= _('Action') ?></label>
 	<select name="action" id="action">
 		<option value="add"<?= ($_POST['action'] ?? NULL) === 'add' ? ' selected=""' : '' ?>><?= _('Add') ?></option>

+ 1 - 0
pg-view/ns/index.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <p>
 	<?= _('This service allows to host and manage DNS records inside a DNS zone.') ?>
 </p>

+ 1 - 0
pg-view/ns/ip.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 	<label for="ip"><?= _('IP address') ?></label><br>

+ 1 - 0
pg-view/ns/loc.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 	<fieldset>

+ 1 - 0
pg-view/ns/mx.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 	<label for="priority"><?= _('Priority') ?></label>

+ 1 - 0
pg-view/ns/ns.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 	<label for="ns"><?= _('Name server') ?></label>

+ 1 - 0
pg-view/ns/print.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 	<input type="radio" name="print" id="table" value="table" checked="">
 	<label for="table"><?= _('Records table') ?></label>

+ 1 - 0
pg-view/ns/srv.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 

+ 1 - 0
pg-view/ns/sshfp.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 

+ 1 - 0
pg-view/ns/sync.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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) ?>
 </p>

+ 1 - 0
pg-view/ns/tlsa.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 

+ 1 - 0
pg-view/ns/txt.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/ns/form.ns.php'; ?>
 	<label for="txt"><?= _('Text') ?></label>

+ 1 - 0
pg-view/ns/zone-add.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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>') ?>
 </p>

+ 1 - 0
pg-view/ns/zone-del.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 	<label for="zone"><?= _('Zone') ?></label>
 	<select required="" name="zone" id="zone">

+ 1 - 0
pg-view/reg/ds.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/reg/select-action.inc.php'; ?>
 	<br>

+ 1 - 0
pg-view/reg/glue.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/reg/select-action.inc.php'; ?>
 	<fieldset>

+ 1 - 0
pg-view/reg/index.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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'])) ?>
 </p>

+ 1 - 0
pg-view/reg/ns.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/reg/select-action.inc.php'; ?>
 	<br>

+ 1 - 0
pg-view/reg/print.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <form method="post">
 <?php require ROOT_PATH . '/pg-view/reg/select-domain.inc.php'; ?>
 	<br>

+ 1 - 0
pg-view/reg/register.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <p>
 	<?= _('Register a new domain on your account.') ?>
 </p>

+ 1 - 0
pg-view/reg/select-action.inc.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 	<label for="action"><?= _('Action') ?></label>
 	<select name="action" id="action">
 		<option value="add"<?= ($_POST['action'] ?? NULL) === 'add' ? ' selected=""' : '' ?>><?= _('Add') ?></option>

+ 1 - 0
pg-view/reg/select-domain.inc.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 	<label for="domain"><?= _('Domain') ?></label>
 	<br>
 	<select required="" name="domain" id="domain">

+ 1 - 0
pg-view/reg/transfer.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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>') ?>
 </p>

+ 1 - 0
pg-view/reg/unregister.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <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).') ?>
 </p>

+ 1 - 1
router.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 require 'init.php';
 
 $pageAddress = substr($_SERVER['REQUEST_URI'], strlen(CONF['common']['prefix']) + 1);

+ 2 - 1
sftpgo-auth.php

@@ -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;
 !DEBUG or ob_start();

+ 1 - 0
view.php

@@ -1,3 +1,4 @@
+<?php declare(strict_types=1); ?>
 <!DOCTYPE html>
 <html lang="<?= LOCALE ?>"<?= empty(SERVICE) ? '' : ' class="' . SERVICE . '"' ?>>
 	<head>