From 7818bd12613048bac0d14cfd19ad0bab4bd88274 Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 17 Sep 2012 13:48:28 -0400 Subject: Use https for Gravatar integration --- docs/04_releases.mkd | 1 + src/com/gitblit/utils/ActivityUtils.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd index 07a1fb31..9ec8f5a5 100644 --- a/docs/04_releases.mkd +++ b/docs/04_releases.mkd @@ -21,6 +21,7 @@ If you are updating from an earlier release AND you have indexed branches with t #### changes +- Use https Gravatar urls to avoid browser complaints - Expose ReceivePack to Groovy push hooks (issue 125) - Redirect to summary page when refreshing the empty repository page on a repository that is not empty (issue 129) - Emit a warning in the log file if running on a Tomcat-based servlet container which is unfriendly to %2F forward-slash url encoding AND Gitblit is configured to mount parameters with %2F forward-slash url encoding (Github/jpyeron, issue 126) diff --git a/src/com/gitblit/utils/ActivityUtils.java b/src/com/gitblit/utils/ActivityUtils.java index 718ca90c..02a9924b 100644 --- a/src/com/gitblit/utils/ActivityUtils.java +++ b/src/com/gitblit/utils/ActivityUtils.java @@ -160,7 +160,7 @@ public class ActivityUtils { } String emailHash = StringUtils.getMD5(email); String url = MessageFormat.format( - "http://www.gravatar.com/avatar/{0}?s={1,number,0}&d=identicon", emailHash, width); + "https://www.gravatar.com/avatar/{0}?s={1,number,0}&d=identicon", emailHash, width); return url; } @@ -174,7 +174,7 @@ public class ActivityUtils { * @throws IOException */ public static GravatarProfile getGravatarProfile(String hash) throws IOException { - String url = MessageFormat.format("http://www.gravatar.com/{0}.json", hash); + String url = MessageFormat.format("https://www.gravatar.com/{0}.json", hash); // Gravatar has a complex json structure Type profileType = new TypeToken>>() { }.getType(); -- cgit v1.2.3