forked from GNUsocial/gnu-social
accept mailto: URIs as OStatus identifiers
This commit is contained in:
parent
9b899eea75
commit
dbb5e9e191
@ -257,6 +257,12 @@ class ActivityUtils
|
|||||||
*/
|
*/
|
||||||
static function validateUri($uri)
|
static function validateUri($uri)
|
||||||
{
|
{
|
||||||
|
// Check mailto: URIs first
|
||||||
|
|
||||||
|
if (preg_match('/^mailto:(.*)$/', $uri, $match)) {
|
||||||
|
return Validate::email($match[1], common_config('email', 'check_domain'));
|
||||||
|
}
|
||||||
|
|
||||||
if (Validate::uri($uri)) {
|
if (Validate::uri($uri)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user