Page MenuHomePhabricator

D10724.id25748.diff
No OneTemporary

D10724.id25748.diff

diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
--- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
+++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
@@ -156,51 +156,6 @@
}
}
- // Try to add Gravatar images for any email addresses associated with the
- // account.
- if (PhabricatorEnv::getEnvConfig('security.allow-outbound-http')) {
- $emails = id(new PhabricatorUserEmail())->loadAllWhere(
- 'userPHID = %s ORDER BY address',
- $user->getPHID());
-
- $futures = array();
- foreach ($emails as $email_object) {
- $email = $email_object->getAddress();
-
- $hash = md5(strtolower(trim($email)));
- $uri = id(new PhutilURI("https://secure.gravatar.com/avatar/{$hash}"))
- ->setQueryParams(
- array(
- 'size' => 200,
- 'default' => '404',
- 'rating' => 'x',
- ));
- $futures[$email] = new HTTPSFuture($uri);
- }
-
- $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
- foreach (Futures($futures) as $email => $future) {
- try {
- list($body) = $future->resolvex();
- $file = PhabricatorFile::newFromFileData(
- $body,
- array(
- 'name' => 'profile-gravatar',
- 'ttl' => (60 * 60 * 4),
- ));
- if ($file->isTransformableImage()) {
- $images[$file->getPHID()] = array(
- 'uri' => $file->getBestURI(),
- 'tip' => pht('Gravatar for %s', $email),
- );
- }
- } catch (Exception $ex) {
- // Just continue.
- }
- }
- unset($unguarded);
- }
-
$images[PhabricatorPHIDConstants::PHID_VOID] = array(
'uri' => $default_image->getBestURI(),
'tip' => pht('Default Picture'),

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 15, 7:49 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7229663
Default Alt Text
D10724.id25748.diff (1 KB)

Event Timeline