When the email address is empty gitlab will give a 500 error

Since some conversion tools do commits with an empty commiters email
address gitlab will fail with a 500 error
This commit is contained in:
Wouter D'Haeseleer 2012-05-03 12:20:27 +02:00
parent 2176e2c915
commit 825d2d69af

View file

@ -3,6 +3,7 @@ module ApplicationHelper
def gravatar_icon(user_email, size = 40)
gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com"
user_email ||= ''
user_email.strip!
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon"
end