diff --git a/app/controllers/user_avatars_controller.rb b/app/controllers/user_avatars_controller.rb index 0fa0d32c701..8a61bfa825b 100644 --- a/app/controllers/user_avatars_controller.rb +++ b/app/controllers/user_avatars_controller.rb @@ -43,8 +43,13 @@ class UserAvatarsController < ApplicationController params.require(:color) params.require(:version) params.require(:size) + hijack do - proxy_avatar("https://avatars.discourse.org/#{params[:version]}/letter/#{params[:letter]}/#{params[:color]}/#{params[:size]}.png", Time.new('1990-01-01')) + begin + proxy_avatar("https://avatars.discourse.org/#{params[:version]}/letter/#{params[:letter]}/#{params[:color]}/#{params[:size]}.png", Time.new('1990-01-01')) + rescue OpenURI::HTTPError + render_blank + end end end