Merge branch 'testing' of gitorious.org:statusnet/mainline into testing

* 'testing' of gitorious.org:statusnet/mainline:
  Validate OStatus avatar URL before fetching.
This commit is contained in:
Zach Copley 2010-03-19 10:38:54 -07:00
commit f0c54243ba
1 changed files with 4 additions and 1 deletions

View File

@ -839,8 +839,8 @@ class Ostatus_profile extends Memcached_DataObject
}
/**
*
* Download and update given avatar image
*
* @param string $url
* @throws Exception in various failure cases
*/
@ -850,6 +850,9 @@ class Ostatus_profile extends Memcached_DataObject
// We've already got this one.
return;
}
if (!common_valid_http_url($url)) {
throw new ServerException(_m("Invalid avatar URL %s"), $url);
}
if ($this->isGroup()) {
$self = $this->localGroup();