]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
allow hyphens in subdomains for webfinger addresses
authorJames Walker <walkah@walkah.net>
Fri, 14 May 2010 20:41:29 +0000 (16:41 -0400)
committerJames Walker <walkah@walkah.net>
Fri, 14 May 2010 20:43:41 +0000 (16:43 -0400)
plugins/OStatus/OStatusPlugin.php

index f183bc7aea81f15332f68bd4212756158d532ad5..5167842ca94719d2f9221cecd34ac8cf77c849de 100644 (file)
@@ -257,7 +257,7 @@ class OStatusPlugin extends Plugin
         $matches = array();
 
         // Webfinger matches: @user@example.com
-        if (preg_match_all('!(?:^|\s+)@((?:\w+\.)*\w+@(?:\w+\.)*\w+(?:\w+\-\w+)*\.\w+)!',
+        if (preg_match_all('!(?:^|\s+)@((?:\w+\.)*\w+@(?:\w+\-?\w+\.)*\w+(?:\w+\-\w+)*\.\w+)!',
                        $text,
                        $wmatches,
                        PREG_OFFSET_CAPTURE)) {