diff --git a/fn/ht.php b/fn/ht.php index 1a2ea21..bc2d388 100644 --- a/fn/ht.php +++ b/fn/ht.php @@ -1,5 +1,7 @@ \n" "Language-Team: LANGUAGE \n" @@ -286,15 +286,15 @@ msgstr "" msgid "Delete an existing HTTP access from a subdirectory of the SFTP space" msgstr "" -#: router.php:151 view.php:39 +#: router.php:152 view.php:39 msgid "This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it." msgstr "" -#: router.php:161 +#: router.php:162 msgid "You need to be logged in to do this." msgstr "" -#: router.php:163 +#: router.php:164 msgid "This account doesn't exist anymore. Log out to end this ghost session." msgstr "" @@ -348,7 +348,7 @@ msgstr "" msgid "IP address malformed." msgstr "" -#: fn/dns.php:68 fn/ht.php:28 +#: fn/dns.php:68 fn/ht.php:30 msgid "Domain malformed." msgstr "" @@ -684,28 +684,38 @@ msgstr "" #: pg-view/ht/add-dns.php:29 pg-view/ns/form.ns.php:8 pg-view/ns/print.php:32 #: pg-view/ns/zone-add.php:6 pg-view/reg/ds.php:8 pg-view/reg/glue.php:8 #: pg-view/reg/glue.php:15 pg-view/reg/ns.php:8 pg-view/reg/print.php:2 -#: pg-view/reg/print.php:16 pg-view/reg/register.php:7 +#: pg-view/reg/print.php:16 pg-view/reg/register.php:11 #: pg-view/reg/unregister.php:6 msgid "Domain" msgstr "" #: pg-view/ht/add-dns.php:31 pg-view/ht/add-onion.php:2 -#: pg-view/ht/add-subdomain.php:4 pg-view/ht/add-subpath.php:4 +#: pg-view/ht/add-subdomain.php:8 pg-view/ht/add-subpath.php:8 msgid "Target directory" msgstr "" #: pg-view/ht/add-dns.php:40 pg-view/ht/add-onion.php:11 -#: pg-view/ht/add-subdomain.php:13 pg-view/ht/add-subpath.php:13 +#: pg-view/ht/add-subdomain.php:17 pg-view/ht/add-subpath.php:17 msgid "Setup access" msgstr "" -#: pg-view/ht/add-subdomain.php:2 pg-view/ns/form.ns.php:10 -#: pg-view/reg/glue.php:10 pg-view/reg/register.php:9 +#: pg-view/ht/add-subdomain.php:2 pg-view/reg/register.php:6 +#, php-format +msgid "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." +msgstr "" + +#: pg-view/ht/add-subdomain.php:6 pg-view/ns/form.ns.php:10 +#: pg-view/reg/glue.php:10 pg-view/reg/register.php:13 #: pg-view/reg/transfer.php:9 msgid "Subdomain" msgstr "" #: pg-view/ht/add-subpath.php:2 +#, php-format +msgid "The path can only contain %1$s, %2$s and %3$s, and must be between 4 and 63 characters." +msgstr "" + +#: pg-view/ht/add-subpath.php:6 msgid "Path" msgstr "" @@ -1138,18 +1148,18 @@ msgid "Nobody can register a domain under these suffixes:" msgstr "" #: pg-view/reg/register.php:2 -msgid "Register a new domain on your account. It must consist of between 4 and 63 letters and digits." +msgid "Register a new domain on your account." msgstr "" -#: pg-view/reg/register.php:14 pg-view/reg/transfer.php:14 +#: pg-view/reg/register.php:18 pg-view/reg/transfer.php:14 msgid "Suffix" msgstr "" -#: pg-view/reg/register.php:27 +#: pg-view/reg/register.php:31 msgid "Check availability" msgstr "" -#: pg-view/reg/register.php:29 +#: pg-view/reg/register.php:33 msgid "Register" msgstr "" diff --git a/pg-act/ht/add-subdomain.php b/pg-act/ht/add-subdomain.php index 8bd2c96..0a1b667 100644 --- a/pg-act/ht/add-subdomain.php +++ b/pg-act/ht/add-subdomain.php @@ -3,7 +3,7 @@ if (dirsStatuses('subdomain')[$_POST['dir']] !== false) output(403, 'Wrong value for dir.'); -if (preg_match('/^[a-z0-9]{1,32}$/D', $_POST['subdomain']) !== 1) +if (preg_match('/' . SUBDOMAIN_REGEX . '/D', $_POST['subdomain']) !== 1) output(403, _('Invalid domain label.')); if (query('select', 'sites', ['address' => $_POST['subdomain'], 'type' => 'subdomain']) !== []) diff --git a/pg-act/ht/add-subpath.php b/pg-act/ht/add-subpath.php index 8f83761..e0bb139 100644 --- a/pg-act/ht/add-subpath.php +++ b/pg-act/ht/add-subpath.php @@ -3,7 +3,7 @@ if (dirsStatuses('subpath')[$_POST['dir']] !== false) output(403, 'Wrong value for dir.'); -if (preg_match('/^[a-z0-9]{1,32}$/D', $_POST['path']) !== 1) +if (preg_match('/' . SUBPATH_REGEX . '/D', $_POST['path']) !== 1) output(403, _('Invalid path.')); if (query('select', 'sites', ['address' => $_POST['path'], 'type' => 'subpath']) !== []) diff --git a/pg-view/ht/add-subdomain.php b/pg-view/ht/add-subdomain.php index b0d8125..3fce989 100644 --- a/pg-view/ht/add-subdomain.php +++ b/pg-view/ht/add-subdomain.php @@ -1,3 +1,7 @@ +

+ a-z', '0-9', '-') ?> +

+

.
diff --git a/pg-view/ht/add-subpath.php b/pg-view/ht/add-subpath.php index 784f6d1..948abc4 100644 --- a/pg-view/ht/add-subpath.php +++ b/pg-view/ht/add-subpath.php @@ -1,6 +1,10 @@ +

+ a-z', '0-9', '-') ?> +

+
- https:///
+ https:///