diff --git a/config.ini b/config.ini
index 50f411c..c4654d6 100644
--- a/config.ini
+++ b/config.ini
@@ -2,12 +2,6 @@
root_path = "/srv/php/niver"
; Prefix in URL, if any
prefix =
-; From RFC2606: Reserved Top Level DNS Names > 2. TLDs for Testing, & Documentation Examples
-domain_example = "example"
-; From RFC3849: IPv6 Address Prefix Reserved for Documentation
-ipv6_example = "2001:db8::3"
-; From RFC5737: IPv4 Address Blocks Reserved for Documentation
-ipv4_example = "203.0.113.42"
[dns]
knotc_path = "/usr/sbin/knotc"
diff --git a/fn/auth.php b/fn/auth.php
index f2b6809..40e3f95 100644
--- a/fn/auth.php
+++ b/fn/auth.php
@@ -3,6 +3,9 @@
define("USERNAME_REGEX", "^[a-z]{4,32}$");
define("PASSWORD_REGEX", "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]{8,1024}|.{10,1024}$");
+define("PLACEHOLDER_USERNAME", "lain");
+define("PLACEHOLDER_PASSWORD", "••••••••••••••••••••••••");
+
// Password storage security
define("ALGO_PASSWORD", PASSWORD_ARGON2ID);
define("OPTIONS_PASSWORD", array(
diff --git a/fn/dns.php b/fn/dns.php
index 6476942..fe5cf00 100644
--- a/fn/dns.php
+++ b/fn/dns.php
@@ -1,5 +1,9 @@
2. TLDs for Testing, & Documentation Examples
+define("PLACEHOLDER_IPV6", "2001:db8::3"); // From RFC3849: IPv6 Address Prefix Reserved for Documentation
+define("PLACEHOLDER_IPV4", "203.0.113.42"); // From RFC5737: IPv4 Address Blocks Reserved for Documentation
+
function knotcExec($suffix, $cmd) {
$action = checkAction($_POST['action']);
diff --git a/public/auth/index.php b/public/auth/index.php
index 8802532..b82a007 100644
--- a/public/auth/index.php
+++ b/public/auth/index.php
@@ -1,17 +1,22 @@
-
-
-Se déconnecter
-
-Changer la clé de passe
-
-
- Vous devez être authentifié·e pour utiliser Niver
-
- Créer un compte
-
- Se connecter
-
+
Déjà un compte ? Se connecter
-prepare("INSERT INTO users(username, password, registration_date) VALUES(:username, :password, :registration_date)"); - - $time = date("Y-m-d H:i:s"); - - $stmt->bindParam(':username', $_POST['username']); - $stmt->bindParam(':password', $password); - $stmt->bindParam(':registration_date', $time); - - $stmt->execute(); - - $_SESSION['username'] = $_POST['username']; - - header('Location: ' . CONF['common']['prefix'] . '/'); - exit; - } - -} - -?> - - +prepare("INSERT INTO users(username, password, registration_date) VALUES(:username, :password, :registration_date)"); + +$time = date("Y-m-d H:i:s"); + +$stmt->bindParam(':username', $_POST['username']); +$stmt->bindParam(':password', $password); +$stmt->bindParam(':registration_date', $time); + +$stmt->execute(); + +$_SESSION['username'] = $_POST['username']; + +header('Location: ' . CONF['common']['prefix'] . '/'); + +success("Compte créé."); diff --git a/public/css/form.css b/public/css/form.css index 40f6837..889170f 100644 --- a/public/css/form.css +++ b/public/css/form.css @@ -35,22 +35,6 @@ input[type=password] { width: 7ch; } -input:invalid+span::after { - content: '✖'; -} - -input:valid+span::after { - content: ''; /* ✓ */ -} - -input+span::after { - display: inline-block; - width: 20px; - font-size: 30px; - padding-left: 20px; - font-family: monospace; -} - :disabled { cursor: not-allowed; } diff --git a/public/ht/https-domain.php b/public/ht/https-domain.php index 4f9efb8..8582465 100644 --- a/public/ht/https-domain.php +++ b/public/ht/https-domain.php @@ -9,7 +9,7 @@ diff --git a/public/ns/srv.php b/public/ns/srv.php index d414a23..f00a01b 100644 --- a/public/ns/srv.php +++ b/public/ns/srv.php @@ -26,7 +26,7 @@