From b811e582005102c73b26b1cca33d1fbba14b0a45 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 8 Dec 2014 13:43:46 -0200 Subject: [PATCH] ChatController: handle gravatar URL's without protocol --- app/controllers/public/chat_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/public/chat_controller.rb b/app/controllers/public/chat_controller.rb index 46a82fc..aff0fcb 100644 --- a/app/controllers/public/chat_controller.rb +++ b/app/controllers/public/chat_controller.rb @@ -19,7 +19,7 @@ class ChatController < PublicController def avatar profile = environment.profiles.find_by_identifier(params[:id]) filename, mimetype = profile_icon(profile, :minor, true) - if filename =~ /^https?:/ + if filename =~ /^(https?:)?\/\// redirect_to filename else data = File.read(File.join(Rails.root, 'public', filename)) -- libgit2 0.21.2