X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fnickname.php;h=e21517497a18cd0587530bc14519fb9ebf310ff5;hb=586fb5a5175d7a10f5f78dd026434e48202e5451;hp=6e638c21b74039a3316532271493b060af5dab68;hpb=924bcd93e5692288f976dd49f15ea3e15c080acc;p=quix0rs-gnu-social.git diff --git a/lib/nickname.php b/lib/nickname.php index 6e638c21b7..e21517497a 100644 --- a/lib/nickname.php +++ b/lib/nickname.php @@ -54,7 +54,10 @@ class Nickname * 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}'; + const WEBFINGER_FMT = '(?:\w+[\w\-\_\.]*)?\w+\@'.URL_REGEX_DOMAIN_NAME; + + // old one without support for -_. in nickname part: + // const WEBFINGER_FMT = '[0-9a-zA-Z_]{1,64}\@[0-9a-zA-Z_-.]{3,255}'; /** * Regex fragment for checking a canonical nickname.