Project

General

Profile

Bug #731

redmine: disable usage of non-free gravatar service

Added by Pierre-Louis Bonicoli 11 days ago. Updated 11 days ago.

Status:
In Progress
Priority:
Normal
Category:
-
Start date:
2021-09-11
Due date:
% Done:

50%

Estimated time:
Patch Available:
Confirmed:
Yes
Branch:
Entity:
DuckCorp
Security:
Help Needed:

Description

The projects.duckcorp.org instance of redmine uses the non-free gravatar service.

Usage of the service should be disabled or another instance backed by a free service should be used.

Note that the next release of redmine will allow to choose another instance than gravatar.

History

#1

Updated by Pierre-Louis Bonicoli 11 days ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

One patch added in toushirou patches/redmine directory: libravatar.patch

--- app/helpers/application_helper.rb    2021-09-10 12:56:09.724361981 +0200
+++ app/helpers/application_helper.rb    2021-09-10 12:58:51.308796985 +0200
@@ -1478,7 +1478,7 @@
   # Returns a link to edit user's avatar if avatars are enabled
   def avatar_edit_link(user, options={})
     if Setting.gravatar_enabled?
-      url = "https://gravatar.com" 
+      url = "https://seccdn.libravatar.org" 
       link_to avatar(user, {:title => l(:button_edit)}.merge(options)), url, :target => '_blank'
     end
   end
--- lib/plugins/gravatar/lib/gravatar.rb    2021-09-10 12:56:52.641540613 +0200
+++ lib/plugins/gravatar/lib/gravatar.rb    2021-09-10 12:58:34.076324401 +0200
@@ -61,7 +61,7 @@

     # Returns the base Gravatar URL for the given email hash
     def gravatar_api_url(hash)
-      "//www.gravatar.com/avatar/#{hash}" 
+      "//seccdn.libravatar.org/avatar/#{hash}" 
     end

     # Return the gravatar URL for the given email address.

#2

Updated by Pierre-Louis Bonicoli 11 days ago

I didn't update the labels displayed in Administration->settings->Display (setting_gravatar_enabled: Use Gravatar user icons and setting_gravatar_default: Default Gravatar image).

Marc Dequènes: does that look ok to you?

Also available in: Atom PDF