X-Git-Url: https://git.mxchange.org/?p=quix0rs-gnu-social.git;a=blobdiff_plain;f=lib%2Fnickname.php;fp=lib%2Fnickname.php;h=1ed0abbe78dbfcec46365c97f73684cb2ff34b83;hp=80be6239c500decb6064920e21f342c924acd36d;hb=4160a3fb730113f3d712bd777884c4b0482f6df1;hpb=abd90bbdf562614755802885dfb5673645df8575;ds=sidebyside diff --git a/lib/nickname.php b/lib/nickname.php index 80be6239c5..1ed0abbe78 100644 --- a/lib/nickname.php +++ b/lib/nickname.php @@ -48,6 +48,14 @@ class Nickname */ const DISPLAY_FMT = '[0-9a-zA-Z_]{1,64}'; + /** + * Simplified regex fragment for acceptable full WebFinger ID of a user + * + * We could probably use an email regex here, but mainly we are interested + * in matching it in our URLs, like https://social.example/user@example.com + */ + const WEBFINGER_FMT = '[0-9a-zA-Z_]{1,64}\@[0-9a-zA-Z_-.]{3,255}'; + /** * Regex fragment for checking a canonical nickname. *