summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-19 10:15:00 -0700
committerBrion Vibber <brion@pobox.com>2010-03-19 10:15:00 -0700
commit9e3e1d3d5632b2f4690018677e2ba82beb399fca (patch)
tree396bebfa97846ee00367cd556ac90da5e185833f /plugins
parent05e3768e6a833d99a5180d4306d68f59e2d8f8c9 (diff)
Validate OStatus avatar URL before fetching.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index e77c8f7e9..e0e0223b8 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -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();