Commit 825d2d69 authored by Wouter D'Haeseleer's avatar Wouter D'Haeseleer

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
parent 2176e2c9
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment