diff --git a/pg-act/ht/keys.php b/pg-act/ht/keys.php index 2d537df..ab0a446 100755 --- a/pg-act/ht/keys.php +++ b/pg-act/ht/keys.php @@ -9,7 +9,7 @@ foreach ($_POST['keys'] as $i => $key) { unset($_POST['keys'][$i]); continue; } - if (preg_match('#^/[/\p{L}\{M}\p{N}\p{P}\p{S}\p{Zs}]{1,254}$#Du', $key['dir'] ?? '') !== 1) + if (preg_match('#^/[/\p{L}\{M}\p{N}\p{P}\p{S}\p{Zs}]{0,254}$#Du', $key['dir'] ?? '') !== 1) output(403, _('Path is not valid.')); if (preg_match('#' . ED25519_PUBKEY_REGEX . '#D', $key['public-key']) !== 1) output(403, _('Ed25519 public key seems wrongly formatted.'));