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

Commit edef6f92 authored by mattl's avatar mattl

Don't statically call Validate functions

parent 62c6ed58
......@@ -281,19 +281,20 @@ class ActivityUtils
static function validateUri($uri)
// Check mailto: URIs first
$validate = new Validate();
if (preg_match('/^mailto:(.*)$/', $uri, $match)) {
return Validate::email($match[1], common_config('email', 'check_domain'));
return $validate->email($match[1], common_config('email', 'check_domain'));
if (Validate::uri($uri)) {
if ($validate->uri($uri)) {
return true;
// Possibly an upstream bug; tag: URIs aren't validated properly
// unless you explicitly ask for them. All other schemes are accepted
// for basic URI validation without asking.
if (Validate::uri($uri, array('allowed_scheme' => array('tag')))) {
if ($validate->uri($uri, array('allowed_scheme' => array('tag')))) {
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