summaryrefslogtreecommitdiff
path: root/lib/activityutils.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-07-22 16:00:26 -0700
committerEvan Prodromou <evan@status.net>2010-07-22 16:00:26 -0700
commitdbb5e9e1914c9dc67019a4abb1948d40171df0d4 (patch)
tree770b2584ae106422a0b8fe5113a53775cf3538b0 /lib/activityutils.php
parent9b899eea750fd54c75fbb58e48526a5cab169f6c (diff)
accept mailto: URIs as OStatus identifiers
Diffstat (limited to 'lib/activityutils.php')
-rw-r--r--lib/activityutils.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/activityutils.php b/lib/activityutils.php
index 401fd7fc2..dd38d4e14 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;
}