Browse Source

add /auth/contact to set contact information

Miraty 1 year ago
parent
commit
d9ff87a833

+ 5 - 0
db/migrations/007-add-medium-to-users.sql

@@ -0,0 +1,5 @@
+BEGIN TRANSACTION;
+
+ALTER TABLE "users" ADD COLUMN "medium" TEXT NOT NULL DEFAULT "";
+
+COMMIT;

+ 1 - 0
db/schema.sql

@@ -18,6 +18,7 @@ CREATE TABLE IF NOT EXISTS "users" (
 	"bucket_last_update" INTEGER NOT NULL,
 	"type"               TEXT    NOT NULL,
 	"services"           TEXT    NOT NULL,
+	"medium"             TEXT    NOT NULL DEFAULT "",
 	PRIMARY KEY("id")
 );
 CREATE TABLE IF NOT EXISTS "approval-keys" (

+ 104 - 68
locales/fr/C/LC_MESSAGES/messages.po

@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-10-29 17:41+0100\n"
+"POT-Creation-Date: 2024-05-21 21:15+0200\n"
 "Language: fr\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 
@@ -55,255 +55,267 @@ msgid "Switch to an approved account using an approval key"
 msgstr "Utiliser une clé d'approbation pour passer à un compte approuvé"
 
 #: pages.php:37
+msgid "Edit contact information"
+msgstr "Modifier les informations de contact"
+
+#: pages.php:38
+msgid "Set the way you want to be contacted if your account is in a specific situation"
+msgstr "Définir un moyen de contact pour si le compte est dans une situation spécifique"
+
+#: pages.php:42
 msgid "Change password"
 msgstr "Changer la clé de passe"
 
-#: pages.php:38
+#: pages.php:43
 msgid "Change the character string used to authenticate yourself"
 msgstr "Changer la chaîne de caractères utilisée pour s'authentifier"
 
-#: pages.php:42
+#: pages.php:47
 msgid "Change username"
 msgstr "Changer l'identifiant"
 
-#: pages.php:43
+#: pages.php:48
 msgid "Change the name used to identify your account when logging in and displayed at the start of every page"
 msgstr "Changer le nom utilisé pour identifier le compte à la connexion et affiché au début de toutes les pages"
 
-#: pages.php:49
+#: pages.php:54
 #, php-format
 msgid "%s registry"
 msgstr "Registre %s"
 
-#: pages.php:50
+#: pages.php:55
 #, php-format
 msgid "Register and delegate a %s subdomain"
 msgstr "Obtenir et déléguer un domaine %s"
 
-#: pages.php:53
+#: pages.php:58
 msgid "Register domain"
 msgstr "Enregistrer un domaine"
 
-#: pages.php:54
+#: pages.php:59
 #, php-format
 msgid "Get a %s subdomain"
 msgstr "Obtenir un sous-domaine de %s"
 
-#: pages.php:58
+#: pages.php:63
 msgid "Unregister domain"
 msgstr "Désenregistrer un domaine"
 
-#: pages.php:59
+#: pages.php:64
 msgid "Delete all data related to a domain and make it available to the public again"
 msgstr "Supprimer toutes les informations liées à un domaine et le redisponibiliser au public"
 
-#: pages.php:62
+#: pages.php:67
 msgid "Display domain records"
 msgstr "Afficher les enregistrements"
 
-#: pages.php:63
+#: pages.php:68
 msgid "Print every record related to a domain and served by the registry"
 msgstr "Montrer tous les enregistrements liés à un domaine et servis par le registre"
 
-#: pages.php:67
+#: pages.php:72
 msgid "Edit records"
 msgstr "Modifier des enregistrements"
 
-#: pages.php:68
+#: pages.php:73
 msgid "Set registry records to delegate a domain to chosen name servers"
 msgstr "Définir les enregistrements du registre pour déléguer un domaine à des serveurs de nom de son choix"
 
-#: pages.php:72 pages.php:77 pages.php:122 pages.php:127 pages.php:132
-#: pages.php:137 pages.php:142 pages.php:147 pages.php:152 pages.php:157
-#: pages.php:162 pages.php:167
+#: pages.php:77 pages.php:82 pages.php:127 pages.php:132 pages.php:137
+#: pages.php:142 pages.php:147 pages.php:152 pages.php:157 pages.php:162
+#: pages.php:167 pages.php:172
 #, php-format
 msgid "%s records"
 msgstr "Enregistrements %s"
 
-#: pages.php:73
+#: pages.php:78
 #, php-format
 msgid "Indicate the name servers of a %s subdomain"
 msgstr "Indiquer les serveurs de nom d'un sous-domaine de %s"
 
-#: pages.php:78
+#: pages.php:83
 msgid "Delegate <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr> trust"
 msgstr "Déléguer la confiance <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr>"
 
-#: pages.php:82
+#: pages.php:87
 msgid "Receive a domain transfer"
 msgstr "Recevoir un transfert de domaine"
 
-#: pages.php:83
+#: pages.php:88
 msgid "Transfer a domain owned by another account to the current account"
 msgstr "Transférer vers le compte actuel un domaine possédé par un autre compte"
 
-#: pages.php:87
+#: pages.php:92
 msgid "Glue records"
 msgstr "Glue records"
 
-#: pages.php:88
+#: pages.php:93
 msgid "Advanced: store the IP address of a name server whose domain is inside the domain it serves"
 msgstr "Avancé&nbsp;: indiquer l'adresse IP d'un serveur de nom dont le domaine descend de la zone qu'il sert"
 
-#: pages.php:94 pg-view/ns/index.php:25
+#: pages.php:99 pg-view/ns/index.php:25
 msgid "Name servers"
 msgstr "Serveurs de nom"
 
-#: pages.php:95
+#: pages.php:100
 msgid "Host and manage domain's records"
 msgstr "Héberger et gérer les enregistrements d'un domaine"
 
-#: pages.php:98
+#: pages.php:103
 msgid "Add zone"
 msgstr "Ajouter une zone"
 
-#: pages.php:99
+#: pages.php:104
 #, php-format
 msgid "The zone will be managed by %s name servers"
 msgstr "La zone sera gérée par les serveurs de nom de %s"
 
-#: pages.php:103
+#: pages.php:108
 msgid "Delete zone"
 msgstr "Supprimer une zone"
 
-#: pages.php:104
+#: pages.php:109
 msgid "Erase all zone data"
 msgstr "Effacer tous les enregistrements d'une zone"
 
-#: pages.php:107
+#: pages.php:112
 msgid "Display zone"
 msgstr "Afficher une zone"
 
-#: pages.php:108
+#: pages.php:113
 msgid "Print zonefile content"
 msgstr "Montrer le contenu d'un fichier de zone"
 
-#: pages.php:112
+#: pages.php:117
 msgid "Edit zone"
 msgstr "Modifier une zone"
 
-#: pages.php:113
+#: pages.php:118
 msgid "Change zonefile content"
 msgstr "Éditer le contenu d'un fichier de zone"
 
-#: pages.php:117
+#: pages.php:122
 msgid "AAAA and A records"
 msgstr "Enregistrements AAAA et A"
 
-#: pages.php:118
+#: pages.php:123
 msgid "Store domain's IP address"
 msgstr "Indiquer l'adresse IP d'un domaine"
 
-#: pages.php:123
+#: pages.php:128
 msgid "Store zone's name server"
 msgstr "Indiquer les serveurs de nom d'une zone"
 
-#: pages.php:128
+#: pages.php:133
 msgid "Associate text to domain"
 msgstr "Associer du texte à un domaine"
 
-#: pages.php:133
+#: pages.php:138
 msgid "Limit the certificate authorities allowed to certify the domain"
 msgstr "Limiter les autorités de certification autorisées à certifier un domaine"
 
-#: pages.php:138
+#: pages.php:143
 msgid "Store the location of a domain's service"
 msgstr "Indiquer l'adresse exacte d'un service pour un domaine"
 
-#: pages.php:143
+#: pages.php:148
 msgid "Store the email server's address"
 msgstr "Indiquer l'adresse d'un serveur de courriels"
 
-#: pages.php:148
+#: pages.php:153
 msgid "Store <abbr title=\"Secure SHell\">SSH</abbr> public keys fingerprints"
 msgstr "Indiquer les empreintes de clés publiques <abbr title=\"Secure SHell\">SSH</abbr>"
 
-#: pages.php:153
+#: pages.php:158
 msgid "Setup <abbr title=\"DNS-based Authentication of Named Entities\">DANE</abbr> by publishing the <abbr title=\"Transport Layer Security\">TLS</abbr> certificate fingerprint"
 msgstr "Mettre en place <abbr title=\"DNS-based Authentication of Named Entities\">DANE</abbr> et publiant l'empreinte d'un certificat <abbr title=\"Transport Layer Security\">TLS</abbr>"
 
-#: pages.php:158
+#: pages.php:163
 msgid "Define a domain as an alias of another"
 msgstr "Définir un domaine comme étant l'alias d'un autre"
 
-#: pages.php:163
+#: pages.php:168
 msgid "Define all subdomains of a domain as aliases of subdomains of another domain"
 msgstr "Définir la descendance d'un domaine comme alias de la descendance d'un autre domaine"
 
-#: pages.php:168
+#: pages.php:173
 msgid "Store geographic coordinates"
 msgstr "Indiquer des coordonnées géographiques"
 
-#: pages.php:172
+#: pages.php:177
 #, php-format
 msgid "Synchronized records"
 msgstr "Enregistrements synchronisés"
 
-#: pages.php:173
+#: pages.php:178
 msgid "Regularly fetch distant records and update them to a local zone"
 msgstr "Récupérer régulièrement des enregistrements distants et les mettre à jour vers une zone locale"
 
-#: pages.php:179
+#: pages.php:184
 msgid "Web"
 msgstr "Web"
 
-#: pages.php:180
+#: pages.php:185
 msgid "Upload a static website into an <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr> space"
 msgstr "Téléverser un site statique dans un espace <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr>"
 
-#: pages.php:183
+#: pages.php:188
 #, php-format
 msgid "%s subpath access"
 msgstr "Accès par sous-chemin de %s"
 
-#: pages.php:184 pages.php:189 pages.php:194
+#: pages.php:189 pages.php:194 pages.php:199
 #, php-format
 msgid "Its URL will look like %s"
 msgstr "Son URL ressemblera à %s"
 
-#: pages.php:184 pages.php:189 pages.php:194
+#: pages.php:189 pages.php:194 pages.php:199
 msgid "mysite"
 msgstr "monsite"
 
-#: pages.php:188
+#: pages.php:193
 #, php-format
 msgid "%s subdomain access"
 msgstr "Accès par sous-domaine de %s"
 
-#: pages.php:193
+#: pages.php:198
 msgid "Dedicated domain with Let's Encrypt certificate access"
 msgstr "Accès par domaine dédié avec certificat Let's Encrypt"
 
-#: pages.php:198
+#: pages.php:203
 msgid "Onion service access"
 msgstr "Accès par service Onion"
 
-#: pages.php:199
+#: pages.php:204
 #, php-format
 msgid "Its URL will look like %s, and work only through the Tor network"
 msgstr "Son URL ressemblera à %s, et ne fonctionnera que par le réseau Tor"
 
-#: pages.php:203 pg-view/ht/del.php:19
+#: pages.php:208 pg-view/ht/del.php:19
 msgid "Delete access"
 msgstr "Supprimer un accès"
 
-#: pages.php:204
+#: pages.php:209
 msgid "Delete an existing HTTP access from a subdirectory of the SFTP space"
 msgstr "Retirer un accès HTTP existant d'un sous-dossier de l'espace SFTP"
 
-#: pages.php:207
+#: pages.php:212
 msgid "Manage SSH keys"
 msgstr "Gérer les clés SSH"
 
-#: pages.php:208
+#: pages.php:213
 msgid "Choose what SSH key can edit what directory"
 msgstr "Choisir quelle clé SSH peut modifier quel dossier"
 
-#: router.php:106 view.php:40
+#: router.php:22
+msgid "Page not found."
+msgstr "Page introuvable."
+
+#: router.php:114 view.php:40
 msgid "This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it."
 msgstr "Ce service est en cours de maintenance. Aucune action ne peut être effectuée avant qu'ane administrataire termine de le réparer."
 
-#: router.php:115
+#: router.php:123
 msgid "You need to be logged in to do this."
 msgstr "Vous devez être connecté·e à un compte pour faire cela."
 
@@ -354,7 +366,7 @@ msgstr "<strong>Erreur de l'utilisataire</strong>&nbsp;: "
 msgid "<strong>Server error</strong>: "
 msgstr "<strong>Erreur du serveur</strong>&nbsp;: "
 
-#: fn/common.php:157
+#: fn/common.php:160
 msgid "Wrong proof."
 msgstr "Preuve incorrecte."
 
@@ -400,6 +412,14 @@ msgstr "Cette clé d'approbation n'est pas disponible. Elle a pu être mal saisi
 msgid "Account approved."
 msgstr "Compte approuvé."
 
+#: pg-act/auth/contact.php:4
+msgid "A forbidden character is present."
+msgstr "Un charactère interdit est présent."
+
+#: pg-act/auth/contact.php:11
+msgid "Contact information updated."
+msgstr "Informations de contact mises à jour."
+
 #: pg-act/auth/login.php:10
 msgid "This account does not exist."
 msgstr "Ce compte n'existe pas."
@@ -456,7 +476,7 @@ msgstr "Ce domaine doit avoir %2$s pour unique enregistrement %1$s."
 msgid "No TXT record with the expected format has been found on domain %s."
 msgstr "Aucun enregistrement TXT avec le format attendu n'a été trouvé pour le domaine %s."
 
-#: pg-act/ht/add-dns.php:48 pg-act/ht/add-onion.php:50
+#: pg-act/ht/add-dns.php:50 pg-act/ht/add-onion.php:50
 #: pg-act/ht/add-subdomain.php:19 pg-act/ht/add-subpath.php:19
 #, php-format
 msgid "%s added on this directory."
@@ -618,6 +638,26 @@ msgstr "Clé d'approbation"
 msgid "Use for this account"
 msgstr "Utiliser pour ce compte"
 
+#: pg-view/auth/contact.php:3
+msgid "You can optionally tell the administrator <strong>how you want to be contacted</strong> in case a resource you own is involved in a <strong>specific problem</strong>, be it moderation, legal or technical. This may especially happen if your account's resources can host or address untrusted content."
+msgstr "Vous pouvez optionnellement dire à l'administrataire <strong>comment vous souhaitez que l'on vous contacte</strong> dans le cas où une ressource que vous possédez est concernée par un <strong>problème spécifique</strong>, qu'il soit de modération, légal ou technique. Ça risque particulièrement de se produire si les ressources de votre compte peuvent héberger ou adresser du contenu que vous n'avez pas préalablement vérifié."
+
+#: pg-view/auth/contact.php:7
+msgid "This is a free-form textual field that is only used manually. You may write detailed instructions. You should make sure the admin is able and willing to contact you this way."
+msgstr "C'est un champ textuel libre qui est seulement utilisé manuellement. Vous pouvez écrire des instructions détaillées. Vous devriez vous assurer que l'admin est capable et d'accord de vous contacter de cette manière."
+
+#: pg-view/auth/contact.php:11
+msgid "Information that is not related to a specific account is usually not conveyed this way."
+msgstr "Les informations qui ne sont pas relatives à un compte spécifique ne sont généralement pas communiquées par ce moyen."
+
+#: pg-view/auth/contact.php:15
+msgid "Contact information"
+msgstr "Informations de contact"
+
+#: pg-view/auth/contact.php:22 pg-view/ht/keys.php:35 pg-view/ns/sync.php:38
+msgid "Update"
+msgstr "Mettre à jour"
+
 #: pg-view/auth/index.php:4
 msgid "Account type"
 msgstr "Type de compte"
@@ -918,10 +958,6 @@ msgstr "Clé publique"
 msgid "Allowed directory"
 msgstr "Dossier autorisé"
 
-#: pg-view/ht/keys.php:35 pg-view/ns/sync.php:38
-msgid "Update"
-msgstr "Mettre à jour"
-
 #: pg-view/ns/caa.php:4
 msgid "Flag"
 msgstr "Flag"

+ 104 - 68
locales/messages.pot

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-10-29 17:41+0100\n"
+"POT-Creation-Date: 2024-05-21 21:15+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -67,255 +67,267 @@ msgid "Switch to an approved account using an approval key"
 msgstr ""
 
 #: pages.php:37
-msgid "Change password"
+msgid "Edit contact information"
 msgstr ""
 
 #: pages.php:38
-msgid "Change the character string used to authenticate yourself"
+msgid "Set the way you want to be contacted if your account is in a specific situation"
 msgstr ""
 
 #: pages.php:42
-msgid "Change username"
+msgid "Change password"
 msgstr ""
 
 #: pages.php:43
+msgid "Change the character string used to authenticate yourself"
+msgstr ""
+
+#: pages.php:47
+msgid "Change username"
+msgstr ""
+
+#: pages.php:48
 msgid "Change the name used to identify your account when logging in and displayed at the start of every page"
 msgstr ""
 
-#: pages.php:49
+#: pages.php:54
 #, php-format
 msgid "%s registry"
 msgstr ""
 
-#: pages.php:50
+#: pages.php:55
 #, php-format
 msgid "Register and delegate a %s subdomain"
 msgstr ""
 
-#: pages.php:53
+#: pages.php:58
 msgid "Register domain"
 msgstr ""
 
-#: pages.php:54
+#: pages.php:59
 #, php-format
 msgid "Get a %s subdomain"
 msgstr ""
 
-#: pages.php:58
+#: pages.php:63
 msgid "Unregister domain"
 msgstr ""
 
-#: pages.php:59
+#: pages.php:64
 msgid "Delete all data related to a domain and make it available to the public again"
 msgstr ""
 
-#: pages.php:62
+#: pages.php:67
 msgid "Display domain records"
 msgstr ""
 
-#: pages.php:63
+#: pages.php:68
 msgid "Print every record related to a domain and served by the registry"
 msgstr ""
 
-#: pages.php:67
+#: pages.php:72
 msgid "Edit records"
 msgstr ""
 
-#: pages.php:68
+#: pages.php:73
 msgid "Set registry records to delegate a domain to chosen name servers"
 msgstr ""
 
-#: pages.php:72 pages.php:77 pages.php:122 pages.php:127 pages.php:132
-#: pages.php:137 pages.php:142 pages.php:147 pages.php:152 pages.php:157
-#: pages.php:162 pages.php:167
+#: pages.php:77 pages.php:82 pages.php:127 pages.php:132 pages.php:137
+#: pages.php:142 pages.php:147 pages.php:152 pages.php:157 pages.php:162
+#: pages.php:167 pages.php:172
 #, php-format
 msgid "%s records"
 msgstr ""
 
-#: pages.php:73
+#: pages.php:78
 #, php-format
 msgid "Indicate the name servers of a %s subdomain"
 msgstr ""
 
-#: pages.php:78
+#: pages.php:83
 msgid "Delegate <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr> trust"
 msgstr ""
 
-#: pages.php:82
+#: pages.php:87
 msgid "Receive a domain transfer"
 msgstr ""
 
-#: pages.php:83
+#: pages.php:88
 msgid "Transfer a domain owned by another account to the current account"
 msgstr ""
 
-#: pages.php:87
+#: pages.php:92
 msgid "Glue records"
 msgstr ""
 
-#: pages.php:88
+#: pages.php:93
 msgid "Advanced: store the IP address of a name server whose domain is inside the domain it serves"
 msgstr ""
 
-#: pages.php:94 pg-view/ns/index.php:25
+#: pages.php:99 pg-view/ns/index.php:25
 msgid "Name servers"
 msgstr ""
 
-#: pages.php:95
+#: pages.php:100
 msgid "Host and manage domain's records"
 msgstr ""
 
-#: pages.php:98
+#: pages.php:103
 msgid "Add zone"
 msgstr ""
 
-#: pages.php:99
+#: pages.php:104
 #, php-format
 msgid "The zone will be managed by %s name servers"
 msgstr ""
 
-#: pages.php:103
+#: pages.php:108
 msgid "Delete zone"
 msgstr ""
 
-#: pages.php:104
+#: pages.php:109
 msgid "Erase all zone data"
 msgstr ""
 
-#: pages.php:107
+#: pages.php:112
 msgid "Display zone"
 msgstr ""
 
-#: pages.php:108
+#: pages.php:113
 msgid "Print zonefile content"
 msgstr ""
 
-#: pages.php:112
+#: pages.php:117
 msgid "Edit zone"
 msgstr ""
 
-#: pages.php:113
+#: pages.php:118
 msgid "Change zonefile content"
 msgstr ""
 
-#: pages.php:117
+#: pages.php:122
 msgid "AAAA and A records"
 msgstr ""
 
-#: pages.php:118
+#: pages.php:123
 msgid "Store domain's IP address"
 msgstr ""
 
-#: pages.php:123
+#: pages.php:128
 msgid "Store zone's name server"
 msgstr ""
 
-#: pages.php:128
+#: pages.php:133
 msgid "Associate text to domain"
 msgstr ""
 
-#: pages.php:133
+#: pages.php:138
 msgid "Limit the certificate authorities allowed to certify the domain"
 msgstr ""
 
-#: pages.php:138
+#: pages.php:143
 msgid "Store the location of a domain's service"
 msgstr ""
 
-#: pages.php:143
+#: pages.php:148
 msgid "Store the email server's address"
 msgstr ""
 
-#: pages.php:148
+#: pages.php:153
 msgid "Store <abbr title=\"Secure SHell\">SSH</abbr> public keys fingerprints"
 msgstr ""
 
-#: pages.php:153
+#: pages.php:158
 msgid "Setup <abbr title=\"DNS-based Authentication of Named Entities\">DANE</abbr> by publishing the <abbr title=\"Transport Layer Security\">TLS</abbr> certificate fingerprint"
 msgstr ""
 
-#: pages.php:158
+#: pages.php:163
 msgid "Define a domain as an alias of another"
 msgstr ""
 
-#: pages.php:163
+#: pages.php:168
 msgid "Define all subdomains of a domain as aliases of subdomains of another domain"
 msgstr ""
 
-#: pages.php:168
+#: pages.php:173
 msgid "Store geographic coordinates"
 msgstr ""
 
-#: pages.php:172
+#: pages.php:177
 #, php-format
 msgid "Synchronized records"
 msgstr ""
 
-#: pages.php:173
+#: pages.php:178
 msgid "Regularly fetch distant records and update them to a local zone"
 msgstr ""
 
-#: pages.php:179
+#: pages.php:184
 msgid "Web"
 msgstr ""
 
-#: pages.php:180
+#: pages.php:185
 msgid "Upload a static website into an <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr> space"
 msgstr ""
 
-#: pages.php:183
+#: pages.php:188
 #, php-format
 msgid "%s subpath access"
 msgstr ""
 
-#: pages.php:184 pages.php:189 pages.php:194
+#: pages.php:189 pages.php:194 pages.php:199
 #, php-format
 msgid "Its URL will look like %s"
 msgstr ""
 
-#: pages.php:184 pages.php:189 pages.php:194
+#: pages.php:189 pages.php:194 pages.php:199
 msgid "mysite"
 msgstr ""
 
-#: pages.php:188
+#: pages.php:193
 #, php-format
 msgid "%s subdomain access"
 msgstr ""
 
-#: pages.php:193
+#: pages.php:198
 msgid "Dedicated domain with Let's Encrypt certificate access"
 msgstr ""
 
-#: pages.php:198
+#: pages.php:203
 msgid "Onion service access"
 msgstr ""
 
-#: pages.php:199
+#: pages.php:204
 #, php-format
 msgid "Its URL will look like %s, and work only through the Tor network"
 msgstr ""
 
-#: pages.php:203 pg-view/ht/del.php:19
+#: pages.php:208 pg-view/ht/del.php:19
 msgid "Delete access"
 msgstr ""
 
-#: pages.php:204
+#: pages.php:209
 msgid "Delete an existing HTTP access from a subdirectory of the SFTP space"
 msgstr ""
 
-#: pages.php:207
+#: pages.php:212
 msgid "Manage SSH keys"
 msgstr ""
 
-#: pages.php:208
+#: pages.php:213
 msgid "Choose what SSH key can edit what directory"
 msgstr ""
 
-#: router.php:106 view.php:40
+#: router.php:22
+msgid "Page not found."
+msgstr ""
+
+#: router.php:114 view.php:40
 msgid "This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it."
 msgstr ""
 
-#: router.php:115
+#: router.php:123
 msgid "You need to be logged in to do this."
 msgstr ""
 
@@ -366,7 +378,7 @@ msgstr ""
 msgid "<strong>Server error</strong>: "
 msgstr ""
 
-#: fn/common.php:157
+#: fn/common.php:160
 msgid "Wrong proof."
 msgstr ""
 
@@ -412,6 +424,14 @@ msgstr ""
 msgid "Account approved."
 msgstr ""
 
+#: pg-act/auth/contact.php:4
+msgid "A forbidden character is present."
+msgstr ""
+
+#: pg-act/auth/contact.php:11
+msgid "Contact information updated."
+msgstr ""
+
 #: pg-act/auth/login.php:10
 msgid "This account does not exist."
 msgstr ""
@@ -468,7 +488,7 @@ msgstr ""
 msgid "No TXT record with the expected format has been found on domain %s."
 msgstr ""
 
-#: pg-act/ht/add-dns.php:48 pg-act/ht/add-onion.php:50
+#: pg-act/ht/add-dns.php:50 pg-act/ht/add-onion.php:50
 #: pg-act/ht/add-subdomain.php:19 pg-act/ht/add-subpath.php:19
 #, php-format
 msgid "%s added on this directory."
@@ -630,6 +650,26 @@ msgstr ""
 msgid "Use for this account"
 msgstr ""
 
+#: pg-view/auth/contact.php:3
+msgid "You can optionally tell the administrator <strong>how you want to be contacted</strong> in case a resource you own is involved in a <strong>specific problem</strong>, be it moderation, legal or technical. This may especially happen if your account's resources can host or address untrusted content."
+msgstr ""
+
+#: pg-view/auth/contact.php:7
+msgid "This is a free-form textual field that is only used manually. You may write detailed instructions. You should make sure the admin is able and willing to contact you this way."
+msgstr ""
+
+#: pg-view/auth/contact.php:11
+msgid "Information that is not related to a specific account is usually not conveyed this way."
+msgstr ""
+
+#: pg-view/auth/contact.php:15
+msgid "Contact information"
+msgstr ""
+
+#: pg-view/auth/contact.php:22 pg-view/ht/keys.php:35 pg-view/ns/sync.php:38
+msgid "Update"
+msgstr ""
+
 #: pg-view/auth/index.php:4
 msgid "Account type"
 msgstr ""
@@ -930,10 +970,6 @@ msgstr ""
 msgid "Allowed directory"
 msgstr ""
 
-#: pg-view/ht/keys.php:35 pg-view/ns/sync.php:38
-msgid "Update"
-msgstr ""
-
 #: pg-view/ns/caa.php:4
 msgid "Flag"
 msgstr ""

+ 5 - 0
pages.php

@@ -33,6 +33,11 @@ define('PAGES', [
 			'description' => _('Switch to an approved account using an approval key'),
 			'tokens_account_cost' => 300,
 		],
+		'contact' => [
+			'title' => _('Edit contact information'),
+			'description' => _('Set the way you want to be contacted if your account is in a specific situation'),
+			'tokens_account_cost' => 300,
+		],
 		'password' => [
 			'title' => _('Change password'),
 			'description' => _('Change the character string used to authenticate yourself'),

+ 11 - 0
pg-act/auth/contact.php

@@ -0,0 +1,11 @@
+<?php declare(strict_types=1);
+
+if (preg_match('/^[\p{L}\p{M}\p{N}\p{P}\p{S}\p{Z}\p{Cc}]{0,2048}$/Dsu', $_POST['medium']) !== 1)
+	output(403, _('A forbidden character is present.'));
+
+rateLimit();
+
+DB->prepare('UPDATE users SET medium = :medium WHERE id = :id')
+->execute([':medium' => $_POST['medium'], ':id' => $_SESSION['id']]);
+
+output(200, _('Contact information updated.'));

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

@@ -50,7 +50,7 @@ if ($registration_data !== [])
 if ($blocked OR $registration_data !== [])
 	message($message);
 
-if ($_POST['action'] !== 'register')
+if ($_POST['action'] ?? NULL !== 'register')
 	message($message . ' ✔️ ' . _('This domain is open to registration!'));
 
 function message(string $message): never {

+ 23 - 0
pg-view/auth/contact.php

@@ -0,0 +1,23 @@
+<?php declare(strict_types=1); ?>
+<p>
+	<?= _('You can optionally tell the administrator <strong>how you want to be contacted</strong> in case a resource you own is involved in a <strong>specific problem</strong>, be it moderation, legal or technical. This may especially happen if your account\'s resources can host or address untrusted content.') ?>
+</p>
+
+<p>
+	<?= _('This is a free-form textual field that is only used manually. You may write detailed instructions. You should make sure the admin is able and willing to contact you this way.') ?>
+</p>
+
+<p>
+	<?= _('Information that is not related to a specific account is usually not conveyed this way.') ?>
+</p>
+
+<form method="post">
+	<label for="medium"><?= _('Contact information') ?></label><br>
+	<textarea name="medium" id="medium" rows="5" placeholder="matrix:u/neo:matrix.example
+mailto:neo@email.example"><?php
+
+echo htmlspecialchars(query('select', 'users', ['id' => $_SESSION['id'] ?? ''], ['medium'])[0] ?? '');
+
+?></textarea>
+	<input type="submit" value="<?= _('Update') ?>">
+</form>