From dbb5e9e1914c9dc67019a4abb1948d40171df0d4 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 22 Jul 2010 16:00:26 -0700 Subject: [PATCH] accept mailto: URIs as OStatus identifiers --- lib/activityutils.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/activityutils.php b/lib/activityutils.php index 401fd7fc28..dd38d4e142 100644 --- a/lib/activityutils.php +++ b/lib/activityutils.php @@ -257,6 +257,12 @@ class ActivityUtils */ 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)) { return true; } -- 2.39.5