Commit 825d2d69af5864bc2ea755b9a267a4a5a3ed5206
1 parent
2176e2c9
Exists in
master
and in
4 other branches
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
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
app/helpers/application_helper.rb
@@ -3,6 +3,7 @@ module ApplicationHelper | @@ -3,6 +3,7 @@ module ApplicationHelper | ||
3 | 3 | ||
4 | def gravatar_icon(user_email, size = 40) | 4 | def gravatar_icon(user_email, size = 40) |
5 | gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com" | 5 | gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com" |
6 | + user_email ||= '' | ||
6 | user_email.strip! | 7 | user_email.strip! |
7 | "#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon" | 8 | "#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon" |
8 | end | 9 | end |