We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit dbb5e9e1 authored by Evan Prodromou's avatar Evan Prodromou

accept mailto: URIs as OStatus identifiers

parent 9b899eea
...@@ -257,6 +257,12 @@ class ActivityUtils ...@@ -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;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment