From 5f63339744eecd75b1065135559ddbe688636be1 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 12 Aug 2019 22:26:07 +0200 Subject: Fix more ActivityPub queries setting cookies and preventing caching (#11557) --- app/controllers/follower_accounts_controller.rb | 2 ++ app/controllers/following_accounts_controller.rb | 2 ++ 2 files changed, 4 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/follower_accounts_controller.rb b/app/controllers/follower_accounts_controller.rb index 6e873de5b..892c51cf4 100644 --- a/app/controllers/follower_accounts_controller.rb +++ b/app/controllers/follower_accounts_controller.rb @@ -7,6 +7,8 @@ class FollowerAccountsController < ApplicationController before_action :require_signature!, if: -> { request.format == :json && authorized_fetch_mode? } before_action :set_cache_headers + skip_around_action :set_locale, if: -> { request.format == :json } + def index respond_to do |format| format.html do diff --git a/app/controllers/following_accounts_controller.rb b/app/controllers/following_accounts_controller.rb index 07d62f7dd..653d9a486 100644 --- a/app/controllers/following_accounts_controller.rb +++ b/app/controllers/following_accounts_controller.rb @@ -7,6 +7,8 @@ class FollowingAccountsController < ApplicationController before_action :require_signature!, if: -> { request.format == :json && authorized_fetch_mode? } before_action :set_cache_headers + skip_around_action :set_locale, if: -> { request.format == :json } + def index respond_to do |format| format.html do -- cgit From 7ffec882ae79a49d6eed42361f7e8d5de99e1d74 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 13 Aug 2019 15:30:37 +0200 Subject: Fix reverse-proxy caching of instance actor object (#11561) --- app/controllers/instance_actors_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/instance_actors_controller.rb b/app/controllers/instance_actors_controller.rb index 41f33602e..6f02d6a35 100644 --- a/app/controllers/instance_actors_controller.rb +++ b/app/controllers/instance_actors_controller.rb @@ -3,6 +3,8 @@ class InstanceActorsController < ApplicationController include AccountControllerConcern + skip_around_action :set_locale + def show expires_in 10.minutes, public: true render json: @account, content_type: 'application/activity+json', serializer: ActivityPub::ActorSerializer, adapter: ActivityPub::Adapter, fields: restrict_fields_to -- cgit From 6e872c6dabf12fdd2619d4042495e52edd6079bd Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 16 Aug 2019 02:08:35 +0200 Subject: Fix 422 being returned instead of 404 when POSTing (#11574) --- app/controllers/application_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0d3913ee0..66569561c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -29,6 +29,8 @@ class ApplicationController < ActionController::Base before_action :store_current_location, except: :raise_not_found, unless: :devise_controller? before_action :require_functional!, if: :user_signed_in? + skip_before_action :verify_authenticity_token, only: :raise_not_found + def raise_not_found raise ActionController::RoutingError, "No route matches #{params[:unmatched_route]}" end -- cgit From e5cee8062f15191d9dd388a65f6caa104abfd559 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 16 Aug 2019 19:15:05 +0200 Subject: Fix blurhash and autoplay not working on public pages (#11585) --- app/controllers/home_controller.rb | 16 ---------------- app/controllers/public_timelines_controller.rb | 7 +------ app/controllers/shares_controller.rb | 18 +----------------- app/controllers/tags_controller.rb | 5 ----- app/helpers/application_helper.rb | 21 +++++++++++++++++++++ app/serializers/initial_state_serializer.rb | 5 +++++ app/views/home/index.html.haml | 3 +-- app/views/layouts/public.html.haml | 1 + app/views/public_timelines/show.html.haml | 1 - app/views/shares/show.html.haml | 2 +- app/views/tags/show.html.haml | 1 - spec/controllers/home_controller_spec.rb | 10 ---------- spec/controllers/shares_controller_spec.rb | 5 +---- 13 files changed, 32 insertions(+), 63 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 22d507e77..7c8a18d17 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -3,7 +3,6 @@ class HomeController < ApplicationController before_action :authenticate_user! before_action :set_referrer_policy_header - before_action :set_initial_state_json def index @body_classes = 'app-body' @@ -39,21 +38,6 @@ class HomeController < ApplicationController redirect_to(matches ? tag_path(CGI.unescape(matches[:tag])) : default_redirect_path) end - def set_initial_state_json - serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer) - @initial_state_json = serializable_resource.to_json - end - - def initial_state_params - { - settings: Web::Setting.find_by(user: current_user)&.data || {}, - push_subscription: current_account.user.web_push_subscription(current_session), - current_account: current_account, - token: current_session.token, - admin: Account.find_local(Setting.site_contact_username.strip.gsub(/\A@/, '')), - } - end - def default_redirect_path if request.path.start_with?('/web') || whitelist_mode? new_user_session_path diff --git a/app/controllers/public_timelines_controller.rb b/app/controllers/public_timelines_controller.rb index 324bdc508..1332ba16c 100644 --- a/app/controllers/public_timelines_controller.rb +++ b/app/controllers/public_timelines_controller.rb @@ -8,12 +8,7 @@ class PublicTimelinesController < ApplicationController before_action :set_body_classes before_action :set_instance_presenter - def show - @initial_state_json = ActiveModelSerializers::SerializableResource.new( - InitialStatePresenter.new(settings: { known_fediverse: Setting.show_known_fediverse_at_about_page }, token: current_session&.token), - serializer: InitialStateSerializer - ).to_json - end + def show; end private diff --git a/app/controllers/shares_controller.rb b/app/controllers/shares_controller.rb index af605b98f..6546b8497 100644 --- a/app/controllers/shares_controller.rb +++ b/app/controllers/shares_controller.rb @@ -6,26 +6,10 @@ class SharesController < ApplicationController before_action :authenticate_user! before_action :set_body_classes - def show - serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer) - @initial_state_json = serializable_resource.to_json - end + def show; end private - def initial_state_params - text = [params[:title], params[:text], params[:url]].compact.join(' ') - - { - settings: Web::Setting.find_by(user: current_user)&.data || {}, - push_subscription: current_account.user.web_push_subscription(current_session), - current_account: current_account, - token: current_session.token, - admin: Account.find_local(Setting.site_contact_username.strip.gsub(/\A@/, '')), - text: text, - } - end - def set_body_classes @body_classes = 'modal-layout compose-standalone' end diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 5a6fcc8fd..4dfa05264 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -17,11 +17,6 @@ class TagsController < ApplicationController respond_to do |format| format.html do expires_in 0, public: true - - @initial_state_json = ActiveModelSerializers::SerializableResource.new( - InitialStatePresenter.new(settings: {}, token: current_session&.token), - serializer: InitialStateSerializer - ).to_json end format.rss do diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9d113263d..23cbb1d93 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -122,4 +122,25 @@ module ApplicationHelper text = word_wrap(text, line_width: line_width - 2, break_sequence: break_sequence) text.split("\n").map { |line| '> ' + line }.join("\n") end + + def render_initial_state + state_params = { + settings: { + known_fediverse: Setting.show_known_fediverse_at_about_page, + }, + + text: [params[:title], params[:text], params[:url]].compact.join(' '), + } + + if user_signed_in? + state_params[:settings] = state_params[:settings].merge(Web::Setting.find_by(user: current_user)&.data || {}) + state_params[:push_subscription] = current_account.user.web_push_subscription(current_session) + state_params[:current_account] = current_account + state_params[:token] = current_session.token + state_params[:admin] = Account.find_local(Setting.site_contact_username.strip.gsub(/\A@/, '')) + end + + json = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(state_params), serializer: InitialStateSerializer).to_json + content_tag(:script, json_escape(json).html_safe, id: 'initial-state', type: 'application/json') + end end diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index 2cebef2c0..fb53ea314 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -38,6 +38,11 @@ class InitialStateSerializer < ActiveModel::Serializer store[:use_pending_items] = object.current_account.user.setting_use_pending_items store[:is_staff] = object.current_account.user.staff? store[:trends] = Setting.trends && object.current_account.user.setting_trends + else + store[:auto_play_gif] = Setting.auto_play_gif + store[:display_media] = Setting.display_media + store[:reduce_motion] = Setting.reduce_motion + store[:use_blurhash] = Setting.use_blurhash end store diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 4c7fac0b6..30c7aab19 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -5,8 +5,7 @@ = preload_link_tag asset_pack_path('features/notifications.js'), crossorigin: 'anonymous' %meta{name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key} - %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) - + = render_initial_state = javascript_pack_tag 'application', integrity: true, crossorigin: 'anonymous' .app-holder#mastodon{ data: { props: Oj.dump(default_props) } } diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index 69738a2f7..b9179e23d 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -1,4 +1,5 @@ - content_for :header_tags do + = render_initial_state = javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous' - content_for :content do diff --git a/app/views/public_timelines/show.html.haml b/app/views/public_timelines/show.html.haml index 913d5d855..07215efdf 100644 --- a/app/views/public_timelines/show.html.haml +++ b/app/views/public_timelines/show.html.haml @@ -3,7 +3,6 @@ - content_for :header_tags do %meta{ name: 'robots', content: 'noindex' }/ - %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) = javascript_pack_tag 'about', integrity: true, crossorigin: 'anonymous' .page-header diff --git a/app/views/shares/show.html.haml b/app/views/shares/show.html.haml index 44b6f145f..f2f5479a7 100644 --- a/app/views/shares/show.html.haml +++ b/app/views/shares/show.html.haml @@ -1,5 +1,5 @@ - content_for :header_tags do - %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) + = render_initial_state = javascript_pack_tag 'share', integrity: true, crossorigin: 'anonymous' #mastodon-compose{ data: { props: Oj.dump(default_props) } } diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml index cf4246822..630702277 100644 --- a/app/views/tags/show.html.haml +++ b/app/views/tags/show.html.haml @@ -5,7 +5,6 @@ %meta{ name: 'robots', content: 'noindex' }/ %link{ rel: 'alternate', type: 'application/rss+xml', href: tag_url(@tag, format: 'rss') }/ - %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) = javascript_pack_tag 'about', integrity: true, crossorigin: 'anonymous' = render 'og' diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb index f43cf0c27..941f1dd91 100644 --- a/spec/controllers/home_controller_spec.rb +++ b/spec/controllers/home_controller_spec.rb @@ -27,16 +27,6 @@ RSpec.describe HomeController, type: :controller do subject expect(assigns(:body_classes)).to eq 'app-body' end - - it 'assigns @initial_state_json' do - subject - initial_state_json = json_str_to_hash(assigns(:initial_state_json)) - expect(initial_state_json[:meta]).to_not be_nil - expect(initial_state_json[:compose]).to_not be_nil - expect(initial_state_json[:accounts]).to_not be_nil - expect(initial_state_json[:settings]).to_not be_nil - expect(initial_state_json[:media_attachments]).to_not be_nil - end end end end diff --git a/spec/controllers/shares_controller_spec.rb b/spec/controllers/shares_controller_spec.rb index a74e9af56..d6de3016a 100644 --- a/spec/controllers/shares_controller_spec.rb +++ b/spec/controllers/shares_controller_spec.rb @@ -7,15 +7,12 @@ describe SharesController do before { sign_in user } describe 'GTE #show' do - subject(:initial_state_json) { JSON.parse(assigns(:initial_state_json), symbolize_names: true) } subject(:body_classes) { assigns(:body_classes) } before { get :show, params: { title: 'test title', text: 'test text', url: 'url1 url2' } } - it 'assigns json' do + it 'returns http success' do expect(response).to have_http_status :ok - expect(initial_state_json[:compose][:text]).to eq 'test title test text url1 url2' - expect(initial_state_json[:meta][:me]).to eq user.account.id.to_s expect(body_classes).to eq 'modal-layout compose-standalone' end end -- cgit From 53071389ee08e38d2f73d56ae92051e74042f387 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 16 Aug 2019 22:58:51 +0200 Subject: Fix multiple issues with replies collection for pages further than self-replies (#11582) * Fix the replies collection returning snowflakes ids rather than URIs Fixes #11568 * Fix min_id in replies queries once self-replies are exhausted * Fix `next` attribute of replies collection being nil when there are no self-replies * Rename other_accounts param to only_other_accounts --- app/controllers/activitypub/replies_controller.rb | 11 ++++++----- app/serializers/activitypub/note_serializer.rb | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/activitypub/replies_controller.rb b/app/controllers/activitypub/replies_controller.rb index ab755ed4e..c62061555 100644 --- a/app/controllers/activitypub/replies_controller.rb +++ b/app/controllers/activitypub/replies_controller.rb @@ -27,7 +27,7 @@ class ActivityPub::RepliesController < ActivityPub::BaseController end def set_replies - @replies = page_params[:other_accounts] ? Status.where.not(account_id: @account.id) : @account.statuses + @replies = page_params[:only_other_accounts] ? Status.where.not(account_id: @account.id) : @account.statuses @replies = @replies.where(in_reply_to_id: @status.id, visibility: [:public, :unlisted]) @replies = @replies.paginate_by_min_id(DESCENDANTS_LIMIT, params[:min_id]) end @@ -38,7 +38,7 @@ class ActivityPub::RepliesController < ActivityPub::BaseController type: :unordered, part_of: account_status_replies_url(@account, @status), next: next_page, - items: @replies.map { |status| status.local ? status : status.id } + items: @replies.map { |status| status.local ? status : status.uri } ) return page if page_requested? @@ -55,16 +55,17 @@ class ActivityPub::RepliesController < ActivityPub::BaseController end def next_page + only_other_accounts = !(@replies&.last&.account_id == @account.id && @replies.size == DESCENDANTS_LIMIT) account_status_replies_url( @account, @status, page: true, - min_id: @replies&.last&.id, - other_accounts: !(@replies&.last&.account_id == @account.id && @replies.size == DESCENDANTS_LIMIT) + min_id: only_other_accounts && !page_params[:only_other_accounts] ? nil : @replies&.last&.id, + only_other_accounts: only_other_accounts ) end def page_params - params_slice(:other_accounts, :min_id).merge(page: true) + params_slice(:only_other_accounts, :min_id).merge(page: true) end end diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 67f596e78..7592e0b1a 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -55,7 +55,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer type: :unordered, part_of: ActivityPub::TagManager.instance.replies_uri_for(object), items: replies.map(&:second), - next: last_id ? ActivityPub::TagManager.instance.replies_uri_for(object, page: true, min_id: last_id) : nil + next: last_id ? ActivityPub::TagManager.instance.replies_uri_for(object, page: true, min_id: last_id) : ActivityPub::TagManager.instance.replies_uri_for(object, page: true, only_other_accounts: true) ) ) end -- cgit From b348c9b0dbd72f2a9930f9fcbbe72cd1c6b3efd8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 17 Aug 2019 18:07:52 +0200 Subject: Add explanation to featured hashtags page and profile (#11586) --- app/controllers/accounts_controller.rb | 1 + app/javascript/styles/mastodon/widgets.scss | 15 ++++++++++ app/views/accounts/show.html.haml | 35 +++++++++++++++--------- app/views/settings/featured_tags/index.html.haml | 4 +++ config/locales/en.yml | 3 ++ 5 files changed, 45 insertions(+), 13 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index f153b63bb..19e8a9bc7 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -18,6 +18,7 @@ class AccountsController < ApplicationController @pinned_statuses = [] @endorsed_accounts = @account.endorsed_accounts.to_a.sample(4) + @featured_hashtags = @account.featured_tags.order(statuses_count: :desc) if current_account && @account.blocking?(current_account) @statuses = [] diff --git a/app/javascript/styles/mastodon/widgets.scss b/app/javascript/styles/mastodon/widgets.scss index 8c30bc57c..b0d2d1787 100644 --- a/app/javascript/styles/mastodon/widgets.scss +++ b/app/javascript/styles/mastodon/widgets.scss @@ -109,6 +109,15 @@ box-shadow: 0 0 15px rgba($base-shadow-color, 0.2); } +.placeholder-widget { + padding: 16px; + border-radius: 4px; + border: 2px dashed $dark-text-color; + text-align: center; + color: $darker-text-color; + margin-bottom: 10px; +} + .contact-widget, .landing-page__information.contact-widget { box-sizing: border-box; @@ -526,6 +535,12 @@ $fluid-breakpoint: $maximum-width + 20px; a { font-size: 14px; line-height: 20px; + } +} + +.notice-widget, +.placeholder-widget { + a { text-decoration: none; font-weight: 500; color: $ui-highlight-color; diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml index 034304936..b63bbc0c3 100644 --- a/app/views/accounts/show.html.haml +++ b/app/views/accounts/show.html.haml @@ -56,24 +56,33 @@ = render 'bio', account: @account - - unless @endorsed_accounts.empty? + - if @endorsed_accounts.empty? && @account.id == current_account&.id + .placeholder-widget= t('accounts.endorsements_hint') + - elsif !@endorsed_accounts.empty? .endorsements-widget %h4= t 'accounts.choices_html', name: content_tag(:bdi, display_name(@account, custom_emojify: true)) - @endorsed_accounts.each do |account| = account_link_to account - - @account.featured_tags.order(statuses_count: :desc).each do |featured_tag| - .directory__tag{ class: params[:tag] == featured_tag.name ? 'active' : nil } - = link_to short_account_tag_path(@account, featured_tag.tag) do - %h4 - = fa_icon 'hashtag' - = featured_tag.name - %small - - if featured_tag.last_status_at.nil? - = t('accounts.nothing_here') - - else - %time.formatted{ datetime: featured_tag.last_status_at.iso8601, title: l(featured_tag.last_status_at) }= l featured_tag.last_status_at - .trends__item__current= number_to_human featured_tag.statuses_count, strip_insignificant_zeros: true + - if @featured_hashtags.empty? && @account.id == current_account&.id + .placeholder-widget + = t('accounts.featured_tags_hint') + = link_to settings_featured_tags_path do + = t('featured_tags.add_new') + = fa_icon 'chevron-right fw' + - else + - @featured_hashtags.each do |featured_tag| + .directory__tag{ class: params[:tag] == featured_tag.name ? 'active' : nil } + = link_to short_account_tag_path(@account, featured_tag.tag) do + %h4 + = fa_icon 'hashtag' + = featured_tag.name + %small + - if featured_tag.last_status_at.nil? + = t('accounts.nothing_here') + - else + %time.formatted{ datetime: featured_tag.last_status_at.iso8601, title: l(featured_tag.last_status_at) }= l featured_tag.last_status_at + .trends__item__current= number_to_human featured_tag.statuses_count, strip_insignificant_zeros: true = render 'application/sidebar' diff --git a/app/views/settings/featured_tags/index.html.haml b/app/views/settings/featured_tags/index.html.haml index 5f69517f3..6734d027c 100644 --- a/app/views/settings/featured_tags/index.html.haml +++ b/app/views/settings/featured_tags/index.html.haml @@ -1,6 +1,10 @@ - content_for :page_title do = t('settings.featured_tags') +%p= t('featured_tags.hint_html') + +%hr.spacer/ + = simple_form_for @featured_tag, url: settings_featured_tags_path do |f| = render 'shared/error_messages', object: @featured_tag diff --git a/config/locales/en.yml b/config/locales/en.yml index 786906e2d..7ef61e279 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -45,6 +45,8 @@ en: what_is_mastodon: What is Mastodon? accounts: choices_html: "%{name}'s choices:" + endorsements_hint: You can endorse people you follow from the web interface, and they will show up here. + featured_tags_hint: You can feature specific hashtags that will be displayed here. follow: Follow followers: one: Follower @@ -664,6 +666,7 @@ en: add_new: Add new errors: limit: You have already featured the maximum amount of hashtags + hint_html: "What are featured hashtags? They are displayed prominently on your public profile and allow people to browse your public posts specifically under those hashtags. They are a great tool for keeping track of creative works or long-term projects." filters: contexts: home: Home timeline -- cgit From 1bc077dc740fcaa284588fff43e71da659090980 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 18 Aug 2019 18:03:56 +0200 Subject: Add HTTP signature keyId to request log (#11591) --- app/controllers/concerns/signature_verification.rb | 15 ++++++++++++++- config/environments/production.rb | 6 ++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/concerns/signature_verification.rb b/app/controllers/concerns/signature_verification.rb index 7b251cf80..ce353f1de 100644 --- a/app/controllers/concerns/signature_verification.rb +++ b/app/controllers/concerns/signature_verification.rb @@ -23,6 +23,19 @@ module SignatureVerification @signature_verification_failure_code || 401 end + def signature_key_id + raw_signature = request.headers['Signature'] + signature_params = {} + + raw_signature.split(',').each do |part| + parsed_parts = part.match(/([a-z]+)="([^"]+)"/i) + next if parsed_parts.nil? || parsed_parts.size != 3 + signature_params[parsed_parts[1]] = parsed_parts[2] + end + + signature_params['keyId'] + end + def signed_request_account return @signed_request_account if defined?(@signed_request_account) @@ -154,7 +167,7 @@ module SignatureVerification .with_fallback { nil } .with_threshold(1) .with_cool_off_time(5.minutes.seconds) - .with_error_handler { |error, handle| error.is_a?(HTTP::Error) ? handle.call(error) : raise(error) } + .with_error_handler { |error, handle| error.is_a?(HTTP::Error) || error.is_a?(OpenSSL::SSL::SSLError) ? handle.call(error) : raise(error) } .run end diff --git a/config/environments/production.rb b/config/environments/production.rb index 70baa6ad1..d1b5a8df5 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -71,6 +71,12 @@ Rails.application.configure do # Better log formatting config.lograge.enabled = true + config.lograge.custom_payload do |controller| + if controller.respond_to?(:signed_request?) && controller.signed_request? + { key: controller.signature_key_id } + end + end + # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false -- cgit From a8b0bb355d3e7351b9f3d53fe7a3fb6d3d011d33 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 18 Aug 2019 18:04:18 +0200 Subject: Fix uncaught 422 and 500 errors (#11590) --- app/controllers/application_controller.rb | 5 +++++ app/controllers/media_proxy_controller.rb | 2 ++ 2 files changed, 7 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 66569561c..1caaa20f7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -25,6 +25,7 @@ class ApplicationController < ActionController::Base rescue_from ActionController::InvalidAuthenticityToken, with: :unprocessable_entity rescue_from ActionController::UnknownFormat, with: :not_acceptable rescue_from Mastodon::NotPermittedError, with: :forbidden + rescue_from HTTP::Error, OpenSSL::SSL::SSLError, with: :internal_server_error before_action :store_current_location, except: :raise_not_found, unless: :devise_controller? before_action :require_functional!, if: :user_signed_in? @@ -95,6 +96,10 @@ class ApplicationController < ActionController::Base respond_with_error(406) end + def internal_server_error + respond_with_error(500) + end + def single_user_mode? @single_user_mode ||= Rails.configuration.x.single_user_mode && Account.where('id > 0').exists? end diff --git a/app/controllers/media_proxy_controller.rb b/app/controllers/media_proxy_controller.rb index 8da6c6fe0..558cd6e30 100644 --- a/app/controllers/media_proxy_controller.rb +++ b/app/controllers/media_proxy_controller.rb @@ -7,6 +7,8 @@ class MediaProxyController < ApplicationController before_action :authenticate_user!, if: :whitelist_mode? + rescue_from ActiveRecord::RecordInvalid, with: :not_found + def show RedisLock.acquire(lock_options) do |lock| if lock.acquired? -- cgit From 9e1d28f48e8197690ab4ec9ff02d981f408bf875 Mon Sep 17 00:00:00 2001 From: Takeshi Umeda Date: Mon, 19 Aug 2019 03:54:36 +0900 Subject: Add an RSS feed tagged to a public profile page (#10502) * Add featured tag support to rss feed on public account page * fix codeing style --- app/controllers/accounts_controller.rb | 16 +++++++++++++--- app/serializers/rss/account_serializer.rb | 8 ++++---- app/views/accounts/show.html.haml | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 19e8a9bc7..0f6f5e3a6 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -28,6 +28,7 @@ class AccountsController < ApplicationController @pinned_statuses = cache_collection(@account.pinned_statuses, Status) if show_pinned_statuses? @statuses = filtered_status_page(params) @statuses = cache_collection(@statuses, Status) + @rss_url = rss_url unless @statuses.empty? @older_url = older_url if @statuses.last.id > filtered_statuses.last.id @@ -38,8 +39,9 @@ class AccountsController < ApplicationController format.rss do expires_in 0, public: true - @statuses = cache_collection(default_statuses.without_reblogs.without_replies.limit(PAGE_SIZE), Status) - render xml: RSS::AccountSerializer.render(@account, @statuses) + @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE) + @statuses = cache_collection(@statuses, Status) + render xml: RSS::AccountSerializer.render(@account, @statuses, params[:tag]) end format.json do @@ -97,6 +99,14 @@ class AccountsController < ApplicationController params[:username] end + def rss_url + if tag_requested? + short_account_tag_url(@account, params[:tag], format: 'rss') + else + short_account_url(@account, format: 'rss') + end + end + def older_url pagination_url(max_id: @statuses.last.id) end @@ -126,7 +136,7 @@ class AccountsController < ApplicationController end def tag_requested? - request.path.ends_with?(Addressable::URI.parse("/tagged/#{params[:tag]}").normalize) + request.path.split('.').first.ends_with?(Addressable::URI.parse("/tagged/#{params[:tag]}").normalize) end def filtered_status_page(params) diff --git a/app/serializers/rss/account_serializer.rb b/app/serializers/rss/account_serializer.rb index 278affe13..680d9de6f 100644 --- a/app/serializers/rss/account_serializer.rb +++ b/app/serializers/rss/account_serializer.rb @@ -5,12 +5,12 @@ class RSS::AccountSerializer include StatusesHelper include RoutingHelper - def render(account, statuses) + def render(account, statuses, tag) builder = RSSBuilder.new builder.title("#{display_name(account)} (@#{account.local_username_and_domain})") .description(account_description(account)) - .link(ActivityPub::TagManager.instance.url_for(account)) + .link(tag.present? ? short_account_tag_url(account, tag) : short_account_url(account)) .logo(full_pack_url('media/images/logo.svg')) .accent_color('2b90d9') @@ -33,7 +33,7 @@ class RSS::AccountSerializer builder.to_xml end - def self.render(account, statuses) - new.render(account, statuses) + def self.render(account, statuses, tag) + new.render(account, statuses, tag) end end diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml index b63bbc0c3..9c26dbabc 100644 --- a/app/views/accounts/show.html.haml +++ b/app/views/accounts/show.html.haml @@ -7,7 +7,7 @@ - if @account.user&.setting_noindex %meta{ name: 'robots', content: 'noindex, noarchive' }/ - %link{ rel: 'alternate', type: 'application/rss+xml', href: account_url(@account, format: 'rss') }/ + %link{ rel: 'alternate', type: 'application/rss+xml', href: @rss_url }/ %link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@account) }/ - if @older_url -- cgit From 9b6a5ed109e1986149c1f15a41d4f442ae8ae39c Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 19 Aug 2019 11:35:48 +0200 Subject: Add public blocks to /about/blocks (#11298) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add automatic blocklist display in /about/blocks Inspired by https://github.com/Gargron/mastodon.social-misc * Add admin option to set who can see instance blocks * Normalize locales files * Rename “Sandbox” to “Silence” for consistency * Disable /about/blocks when in whitelist mode * Optionally display rationale for domain blocks * Only display domain blocks that have user-facing limitations, and order them * Redesign table of blocked domains to better handle long domain names and rationales * Change domain blocks ordering now that rationales aren't displayed right away * Only show explanation for block severities actually in use * Reword instance block explanations and add disclaimer for public fetch mode --- app/controllers/about_controller.rb | 34 ++++++++++++++- app/javascript/packs/public.js | 9 ++++ app/javascript/styles/mastodon/tables.scss | 67 ++++++++++++++++++++++++++++++ app/models/domain_block.rb | 1 + app/models/form/admin_settings.rb | 4 ++ app/views/about/blocks.html.haml | 48 +++++++++++++++++++++ app/views/admin/settings/edit.html.haml | 6 +++ config/locales/en.yml | 24 +++++++++++ config/routes.rb | 7 ++-- config/settings.yml | 2 + 10 files changed, 197 insertions(+), 5 deletions(-) create mode 100644 app/views/about/blocks.html.haml (limited to 'app/controllers') diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb index d276e8fe5..5e942e5c0 100644 --- a/app/controllers/about_controller.rb +++ b/app/controllers/about_controller.rb @@ -3,10 +3,12 @@ class AboutController < ApplicationController layout 'public' - before_action :require_open_federation!, only: [:show, :more] + before_action :require_open_federation!, only: [:show, :more, :blocks] + before_action :check_blocklist_enabled, only: [:blocks] + before_action :authenticate_user!, only: [:blocks], if: :blocklist_account_required? before_action :set_body_classes, only: :show before_action :set_instance_presenter - before_action :set_expires_in + before_action :set_expires_in, only: [:show, :more, :terms] skip_before_action :require_functional!, only: [:more, :terms] @@ -18,12 +20,40 @@ class AboutController < ApplicationController def terms; end + def blocks + @show_rationale = Setting.show_domain_blocks_rationale == 'all' + @show_rationale |= Setting.show_domain_blocks_rationale == 'users' && !current_user.nil? && current_user.functional? + @blocks = DomainBlock.with_user_facing_limitations.order('(CASE severity WHEN 0 THEN 1 WHEN 1 THEN 2 WHEN 2 THEN 0 END), reject_media, domain').to_a + end + private def require_open_federation! not_found if whitelist_mode? end + def check_blocklist_enabled + not_found if Setting.show_domain_blocks == 'disabled' + end + + def blocklist_account_required? + Setting.show_domain_blocks == 'users' + end + + def block_severity_text(block) + if block.severity == 'suspend' + I18n.t('domain_blocks.suspension') + else + limitations = [] + limitations << I18n.t('domain_blocks.media_block') if block.reject_media? + limitations << I18n.t('domain_blocks.silence') if block.severity == 'silence' + limitations.join(', ') + end + end + + helper_method :block_severity_text + helper_method :public_fetch_mode? + def new_user User.new.tap do |user| user.build_account diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index b58622a8d..c5cd7129f 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -141,6 +141,15 @@ function main() { return false; }); + delegate(document, '.blocks-table button.icon-button', 'click', function(e) { + e.preventDefault(); + + const classList = this.firstElementChild.classList; + classList.toggle('fa-chevron-down'); + classList.toggle('fa-chevron-up'); + this.parentElement.parentElement.nextElementSibling.classList.toggle('hidden'); + }); + delegate(document, '.modal-button', 'click', e => { e.preventDefault(); diff --git a/app/javascript/styles/mastodon/tables.scss b/app/javascript/styles/mastodon/tables.scss index 11ac6dfeb..fe6beba5d 100644 --- a/app/javascript/styles/mastodon/tables.scss +++ b/app/javascript/styles/mastodon/tables.scss @@ -241,3 +241,70 @@ a.table-action-link { } } } + +.blocks-table { + width: 100%; + max-width: 100%; + border-spacing: 0; + border-collapse: collapse; + table-layout: fixed; + border: 1px solid darken($ui-base-color, 8%); + + thead { + border: 1px solid darken($ui-base-color, 8%); + background: darken($ui-base-color, 4%); + font-weight: 500; + + th.severity-column { + width: 120px; + } + + th.button-column { + width: 23px; + } + } + + tbody > tr { + border: 1px solid darken($ui-base-color, 8%); + border-bottom: 0; + background: darken($ui-base-color, 4%); + + &:hover { + background: darken($ui-base-color, 2%); + } + + &.even { + background: $ui-base-color; + + &:hover { + background: lighten($ui-base-color, 2%); + } + } + + &.rationale { + background: lighten($ui-base-color, 4%); + border-top: 0; + + &:hover { + background: lighten($ui-base-color, 6%); + } + + &.hidden { + display: none; + } + } + + td:first-child { + overflow: hidden; + text-overflow: ellipsis; + } + } + + th, + td { + padding: 8px; + line-height: 18px; + vertical-align: top; + text-align: left; + } +} diff --git a/app/models/domain_block.rb b/app/models/domain_block.rb index 37b8d98c6..4383cbd05 100644 --- a/app/models/domain_block.rb +++ b/app/models/domain_block.rb @@ -25,6 +25,7 @@ class DomainBlock < ApplicationRecord delegate :count, to: :accounts, prefix: true scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) } + scope :with_user_facing_limitations, -> { where(severity: [:silence, :suspend]).or(where(reject_media: true)) } class << self def suspend?(domain) diff --git a/app/models/form/admin_settings.rb b/app/models/form/admin_settings.rb index 051268375..6bc3ca9f5 100644 --- a/app/models/form/admin_settings.rb +++ b/app/models/form/admin_settings.rb @@ -30,6 +30,8 @@ class Form::AdminSettings mascot spam_check_enabled trends + show_domain_blocks + show_domain_blocks_rationale ).freeze BOOLEAN_KEYS = %i( @@ -60,6 +62,8 @@ class Form::AdminSettings validates :site_contact_email, :site_contact_username, presence: true validates :site_contact_username, existing_username: true validates :bootstrap_timeline_accounts, existing_username: { multiple: true } + validates :show_domain_blocks, inclusion: { in: %w(disabled users all) } + validates :show_domain_blocks_rationale, inclusion: { in: %w(disabled users all) } def initialize(_attributes = {}) super diff --git a/app/views/about/blocks.html.haml b/app/views/about/blocks.html.haml new file mode 100644 index 000000000..a81a4d1eb --- /dev/null +++ b/app/views/about/blocks.html.haml @@ -0,0 +1,48 @@ +- content_for :page_title do + = t('domain_blocks.title', instance: site_hostname) + +.grid + .column-0 + .box-widget.rich-formatting + %h2= t('domain_blocks.blocked_domains') + %p= t('domain_blocks.description', instance: site_hostname) + .table-wrapper + %table.blocks-table + %thead + %tr + %th= t('domain_blocks.domain') + %th.severity-column= t('domain_blocks.severity') + - if @show_rationale + %th.button-column + %tbody + - if @blocks.empty? + %tr + %td{ colspan: @show_rationale ? 3 : 2 }= t('domain_blocks.no_domain_blocks') + - else + - @blocks.each_with_index do |block, i| + %tr{ class: i % 2 == 0 ? 'even': nil } + %td{ title: block.domain }= block.domain + %td= block_severity_text(block) + - if @show_rationale + %td + - if block.public_comment.present? + %button.icon-button{ title: t('domain_blocks.show_rationale'), 'aria-label' => t('domain_blocks.show_rationale') } + = fa_icon 'chevron-down fw', 'aria-hidden' => true + - if @show_rationale + - if block.public_comment.present? + %tr.rationale.hidden + %td{ colspan: 3 }= block.public_comment.presence + %h2= t('domain_blocks.severity_legend.title') + - if @blocks.any? { |block| block.reject_media? } + %h3= t('domain_blocks.media_block') + %p= t('domain_blocks.severity_legend.media_block') + - if @blocks.any? { |block| block.severity == 'silence' } + %h3= t('domain_blocks.silence') + %p= t('domain_blocks.severity_legend.silence') + - if @blocks.any? { |block| block.severity == 'suspend' } + %h3= t('domain_blocks.suspension') + %p= t('domain_blocks.severity_legend.suspension') + - if public_fetch_mode? + %p= t('domain_blocks.severity_legend.suspension_disclaimer') + .column-1 + = render 'application/sidebar' diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml index 28c0ece15..28880c087 100644 --- a/app/views/admin/settings/edit.html.haml +++ b/app/views/admin/settings/edit.html.haml @@ -79,6 +79,12 @@ .fields-group = f.input :min_invite_role, wrapper: :with_label, collection: %i(disabled user moderator admin), label: t('admin.settings.registrations.min_invite_role.title'), label_method: lambda { |role| role == :disabled ? t('admin.settings.registrations.min_invite_role.disabled') : t("admin.accounts.roles.#{role}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' + .fields-row + .fields-row__column.fields-row__column-6.fields-group + = f.input :show_domain_blocks, wrapper: :with_label, collection: %i(disabled users all), label: t('admin.settings.domain_blocks.title'), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' + .fields-row__column.fields-row__column-6.fields-group + = f.input :show_domain_blocks_rationale, wrapper: :with_label, collection: %i(disabled users all), label: t('admin.settings.domain_blocks_rationale.title'), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' + .fields-group = f.input :closed_registrations_message, as: :text, wrapper: :with_block_label, label: t('admin.settings.registrations.closed_message.title'), hint: t('admin.settings.registrations.closed_message.desc_html'), input_html: { rows: 8 } = f.input :site_extended_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description_extended.title'), hint: t('admin.settings.site_description_extended.desc_html'), input_html: { rows: 8 } unless whitelist_mode? diff --git a/config/locales/en.yml b/config/locales/en.yml index 4696dc11b..8d267065c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -423,6 +423,13 @@ en: custom_css: desc_html: Modify the look with CSS loaded on every page title: Custom CSS + domain_blocks: + all: To everyone + disabled: To no one + title: Show domain blocks + users: To logged-in local users + domain_blocks_rationale: + title: Show rationale hero: desc_html: Displayed on the frontpage. At least 600x100px recommended. When not set, falls back to server thumbnail title: Hero image @@ -630,6 +637,23 @@ en: people: one: "%{count} person" other: "%{count} people" + domain_blocks: + blocked_domains: List of limited and blocked domains + description: This is the list of servers that %{instance} limits or reject federation with. + domain: Domain + media_block: Media block + no_domain_blocks: "(No domain blocks)" + severity: Severity + severity_legend: + media_block: Media files coming from the server are neither fetched, stored, or displayed to the user. + silence: Accounts from silenced servers can be found, followed and interacted with, but their toots will not appear in the public timelines, and notifications from them will not reach local users who are not following them. + suspension: No content from suspended servers is stored or displayed, nor is any content sent to them. Interactions from suspended servers are ignored. + suspension_disclaimer: Suspended servers may occasionally retrieve public content from this server. + title: Severities + show_rationale: Show rationale + silence: Silence + suspension: Suspension + title: "%{instance} List of blocked instances" domain_validator: invalid_domain: is not a valid domain name errors: diff --git a/config/routes.rb b/config/routes.rb index 9c33b8190..9ae24b0cd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -423,9 +423,10 @@ Rails.application.routes.draw do get '/web/(*any)', to: 'home#index', as: :web - get '/about', to: 'about#show' - get '/about/more', to: 'about#more' - get '/terms', to: 'about#terms' + get '/about', to: 'about#show' + get '/about/more', to: 'about#more' + get '/about/blocks', to: 'about#blocks' + get '/terms', to: 'about#terms' root 'home#index' diff --git a/config/settings.yml b/config/settings.yml index 4e5eefb59..6dbc46706 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -64,6 +64,8 @@ defaults: &defaults peers_api_enabled: true show_known_fediverse_at_about_page: true spam_check_enabled: true + show_domain_blocks: 'disabled' + show_domain_blocks_rationale: 'disabled' development: <<: *defaults -- cgit From cb62a83a71a9679061f8daa468119124b5da5e76 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 19 Aug 2019 11:40:42 +0200 Subject: Add invite comments (#10465) --- app/controllers/invites_controller.rb | 2 +- app/models/invite.rb | 3 +++ app/views/invites/_form.html.haml | 3 +++ app/views/invites/_invite.html.haml | 3 +++ app/views/invites/index.html.haml | 1 + db/migrate/20190403141604_add_comment_to_invites.rb | 5 +++++ db/schema.rb | 1 + 7 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20190403141604_add_comment_to_invites.rb (limited to 'app/controllers') diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb index de5280305..8d92147e2 100644 --- a/app/controllers/invites_controller.rb +++ b/app/controllers/invites_controller.rb @@ -43,7 +43,7 @@ class InvitesController < ApplicationController end def resource_params - params.require(:invite).permit(:max_uses, :expires_in, :autofollow) + params.require(:invite).permit(:max_uses, :expires_in, :autofollow, :comment) end def set_body_classes diff --git a/app/models/invite.rb b/app/models/invite.rb index 02ab8e0b2..29d25eae8 100644 --- a/app/models/invite.rb +++ b/app/models/invite.rb @@ -12,6 +12,7 @@ # created_at :datetime not null # updated_at :datetime not null # autofollow :boolean default(FALSE), not null +# comment :text # class Invite < ApplicationRecord @@ -22,6 +23,8 @@ class Invite < ApplicationRecord scope :available, -> { where(expires_at: nil).or(where('expires_at >= ?', Time.now.utc)) } + validates :comment, length: { maximum: 420 } + before_validation :set_code def valid_for_use? diff --git a/app/views/invites/_form.html.haml b/app/views/invites/_form.html.haml index 3a2a5ef0e..b19f70539 100644 --- a/app/views/invites/_form.html.haml +++ b/app/views/invites/_form.html.haml @@ -10,5 +10,8 @@ .fields-group = f.input :autofollow, wrapper: :with_label + .fields-group + = f.input :comment, wrapper: :with_label, input_html: { maxlength: 420 } + .actions = f.button :button, t('invites.generate'), type: :submit diff --git a/app/views/invites/_invite.html.haml b/app/views/invites/_invite.html.haml index 62799ca5b..03050c868 100644 --- a/app/views/invites/_invite.html.haml +++ b/app/views/invites/_invite.html.haml @@ -20,6 +20,9 @@ %td{ colspan: 2 } = t('invites.expired') + %td + = invite.comment + %td - if invite.valid_for_use? && policy(invite).destroy? = table_link_to 'times', t('invites.delete'), invite_path(invite), method: :delete diff --git a/app/views/invites/index.html.haml b/app/views/invites/index.html.haml index 61420ab1e..62065d6ae 100644 --- a/app/views/invites/index.html.haml +++ b/app/views/invites/index.html.haml @@ -15,6 +15,7 @@ %th %th= t('invites.table.uses') %th= t('invites.table.expires_at') + %th= t('invites.table.comment') %th %tbody = render @invites diff --git a/db/migrate/20190403141604_add_comment_to_invites.rb b/db/migrate/20190403141604_add_comment_to_invites.rb new file mode 100644 index 000000000..f0d7b1dcd --- /dev/null +++ b/db/migrate/20190403141604_add_comment_to_invites.rb @@ -0,0 +1,5 @@ +class AddCommentToInvites < ActiveRecord::Migration[5.2] + def change + add_column :invites, :comment, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 0da20d62f..18f615d61 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -344,6 +344,7 @@ ActiveRecord::Schema.define(version: 2019_08_15_225426) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.boolean "autofollow", default: false, null: false + t.text "comment" t.index ["code"], name: "index_invites_on_code", unique: true t.index ["user_id"], name: "index_invites_on_user_id" end -- cgit From f00a0f35eeba7911f9db9b791a0b580bb43588e7 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 19 Aug 2019 21:48:34 +0200 Subject: Use public pack in about controller to handle blockpage JS --- app/controllers/about_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb index 5003ae61c..7b0438127 100644 --- a/app/controllers/about_controller.rb +++ b/app/controllers/about_controller.rb @@ -65,7 +65,7 @@ class AboutController < ApplicationController helper_method :new_user def set_pack - use_pack 'common' + use_pack 'public' end def set_instance_presenter -- cgit