James Moger
2012-09-17 7818bd12613048bac0d14cfd19ad0bab4bd88274
Use https for Gravatar integration
2 files modified
5 ■■■■■ changed files
docs/04_releases.mkd 1 ●●●● patch | view | raw | blame | history
src/com/gitblit/utils/ActivityUtils.java 4 ●●●● patch | view | raw | blame | history
docs/04_releases.mkd
@@ -21,6 +21,7 @@
#### 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)
src/com/gitblit/utils/ActivityUtils.java
@@ -160,7 +160,7 @@
        }
        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 @@
     * @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<Map<String, List<GravatarProfile>>>() {
        }.getType();