From a3f3bcf6ef80fb3276298c31fb57f8a34fde420f Mon Sep 17 00:00:00 2001 From: Nils Vogels Date: Fri, 30 Aug 2013 11:51:55 +0200 Subject: [PATCH] Adjusting the description of the 404 message, in order to avoid having to specify why users got a 404, and possibly leaking information while doing this See discussion in #3717 for rationale on not implementing specific HTTP codes This solves around #3717 and #3728 Adjusting travis breakage --- app/views/errors/not_public.haml | 2 +- config/locales/diaspora/en.yml | 1 + features/step_definitions/message_steps.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/errors/not_public.haml b/app/views/errors/not_public.haml index 008dd27ed..e1f5f13d1 100644 --- a/app/views/errors/not_public.haml +++ b/app/views/errors/not_public.haml @@ -9,6 +9,6 @@ 404 #content - = t('error_messages.post_not_public') + = t('error_messages.post_not_public_or_not_exist') %br = t('error_messages.login_try_again', :login_link => new_user_session_path).html_safe diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 2084c7aad..95b6d932e 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -81,6 +81,7 @@ en: invalid_fields: "Invalid Fields" correct_the_following_errors_and_try_again: "Correct the following errors and try again." post_not_public: "The post you are trying to view is not public!" + post_not_public_or_not_exist: "The post you are trying to view is not public, or does not exist!" login_try_again: "Please login and try again." admins: diff --git a/features/step_definitions/message_steps.rb b/features/step_definitions/message_steps.rb index 19cab4914..a3223b830 100644 --- a/features/step_definitions/message_steps.rb +++ b/features/step_definitions/message_steps.rb @@ -10,7 +10,7 @@ Then /^I should see the "(.*)" message$/ do |message| when 'you are nsfw' I18n.translate('profiles.edit.you_are_nsfw') when 'post not public' - I18n.translate('error_messages.post_not_public') + I18n.translate('error_messages.post_not_public_or_not_exist') else raise "muriel, you don't have that message key, add one here" end