From e59207a79b6536ec44c580d3e31943a2e95e09fc Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Tue, 24 Jan 2012 11:54:05 +0000 Subject: Return a 404 for missing user profile pictures. Fixes #363 --- app/controllers/user_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/controllers/user_controller.rb') diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 45b71a3a9..f49fc9165 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -489,7 +489,8 @@ class UserController < ApplicationController raise ActiveRecord::RecordNotFound.new("user not found, url_name=" + params[:url_name]) end if !@display_user.profile_photo - raise "user has no profile photo, url_name=" + params[:url_name] + raise ActiveRecord::RecordNotFound.new("user has no profile photo, url_name=" + params[:url_name]) + end response.content_type = "image/png" -- cgit v1.2.3