]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'main' into glitch-soc/merge-upstream
authorClaire <claire.github-309c@sitedethib.com>
Tue, 20 Apr 2021 10:17:14 +0000 (12:17 +0200)
committerClaire <claire.github-309c@sitedethib.com>
Tue, 20 Apr 2021 10:17:14 +0000 (12:17 +0200)
Conflicts:
- `README.md`:
  Upstream updated copyright year, we don't mention it so kept our version.
- `app/controllers/admin/dashboard_controller.rb`:
  Not really a conflict, upstream change (removing the spam checker) too close
  to glitch-soc changes. Ported upstream changes.
- `app/models/form/admin_settings.rb`:
  Same.
- `app/services/remove_status_service.rb`:
  Same.
- `app/views/admin/settings/edit.html.haml`:
  Same.
- `config/settings.yml`:
  Same.
- `config/environments/production.rb`:
  Not a real conflict, upstream added a default HTTP header, but we have
  extra headers in glitch-soc.
  Added the header.

22 files changed:
1  2 
Gemfile
Gemfile.lock
app/controllers/admin/dashboard_controller.rb
app/helpers/application_helper.rb
app/javascript/styles/mastodon/components.scss
app/lib/activitypub/activity/create.rb
app/lib/formatter.rb
app/lib/tag_manager.rb
app/models/account.rb
app/models/form/admin_settings.rb
app/services/process_mentions_service.rb
app/services/remove_status_service.rb
app/views/admin/dashboard/index.html.haml
app/views/admin/settings/edit.html.haml
config/environments/production.rb
config/initializers/content_security_policy.rb
config/navigation.rb
config/routes.rb
config/settings.yml
db/schema.rb
package.json
yarn.lock

diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
Simple merge
index 9e921fb954c1fa7c64b3406dade48d44c21b6bfa,c829ed98f873460fbc1eefdc6abb6b2fd71b707c..a00d7ed96d3fc3bc7e200deceaaccf951a1e74e1
@@@ -35,8 -35,6 +35,7 @@@ module Admi
        @whitelist_enabled     = whitelist_mode?
        @profile_directory     = Setting.profile_directory
        @timeline_preview      = Setting.timeline_preview
-       @spam_check_enabled    = Setting.spam_check_enabled
 +      @keybase_integration   = Setting.enable_keybase
        @trends_enabled        = Setting.trends
      end
  
Simple merge
Simple merge
index 29dde128c9cc4e11666038965b073cc503bf6c7f,39a98c3eb92db784f20a4518e3fa68716c3b78cf..a1d12a654eb43ab1420238dd5ba570a71db16487
@@@ -22,17 -22,8 +22,9 @@@ class TagManage
      uri.normalized_host
    end
  
-   def same_acct?(canonical, needle)
-     return true if canonical.casecmp(needle).zero?
-     username, domain = needle.split('@')
-     local_domain?(domain) && canonical.casecmp(username).zero?
-   end
    def local_url?(url)
      uri    = Addressable::URI.parse(url).normalize
 +    return false unless uri.host
      domain = uri.host + (uri.port ? ":#{uri.port}" : '')
  
      TagManager.instance.web_domain?(domain)
Simple merge
index 999d835e65ccdf31c61f12596e485b2699f98710,b5c3dcdbe89842be69c8fb7bf83db89a126423c9..558a906d231bc73fa6bb52937e851c40a9d44cef
@@@ -33,9 -29,6 +33,8 @@@ class Form::AdminSetting
      thumbnail
      hero
      mascot
-     spam_check_enabled
 +    show_reblogs_in_public_timelines
 +    show_replies_in_public_timelines
      trends
      trendable_by_default
      show_domain_blocks
      show_known_fediverse_at_about_page
      preview_sensitive_media
      profile_directory
-     spam_check_enabled
 +    hide_followers_count
 +    enable_keybase
 +    show_reblogs_in_public_timelines
 +    show_replies_in_public_timelines
      trends
      trendable_by_default
      noindex
index 764ed288d3937860fc77cc25051aa0d082d4480c,2c2a2664156f3603426f8bd3439218420add85d8..17868d4fd83e861cc1dae09d880d0e112228f3ea
@@@ -41,8 -38,6 +38,7 @@@ class RemoveStatusService < BaseServic
            remove_from_hashtags
            remove_from_public
            remove_from_media if @status.media_attachments.any?
-           remove_from_spam_check
 +          remove_from_direct if status.direct_visibility?
            remove_media
          end
  
index fa8d8441ef12a4d7e26e3e2a05c4e8050740c45e,0e705f20549009034d9b56612d1fe51c075ec60e..1fab9dd06fcdae91e54ed71037d1c534aa56c412
      .fields-group
        = f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html')
  
-   .fields-group
-     = f.input :spam_check_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.spam_check_enabled.title'), hint: t('admin.settings.spam_check_enabled.desc_html')
 +  .fields-group
 +    = f.input :hide_followers_count, as: :boolean, wrapper: :with_label, label: t('admin.settings.hide_followers_count.title'), hint: t('admin.settings.hide_followers_count.desc_html')
 +
 +  .fields-group
 +    = f.input :enable_keybase, as: :boolean, wrapper: :with_label, label: t('admin.settings.enable_keybase.title'), hint: t('admin.settings.enable_keybase.desc_html')
 +
 +  .fields-group
 +    = f.input :show_reblogs_in_public_timelines, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_reblogs_in_public_timelines.title'), hint: t('admin.settings.show_reblogs_in_public_timelines.desc_html')
 +
 +  .fields-group
 +    = f.input :show_replies_in_public_timelines, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_replies_in_public_timelines.title'), hint: t('admin.settings.show_replies_in_public_timelines.desc_html')
 +
    %hr.spacer/
  
    .fields-group
index 8d811451cb943ac605417aafa20400c61d2bc324,df6b07d77df7ae6395da02831ad532d3f58e35a3..bf6b5d88e3bf864bb5ec7944cfe7b76a3f62c04b
@@@ -112,14 -115,11 +115,14 @@@ Rails.application.configure d
    config.action_mailer.delivery_method = ENV.fetch('SMTP_DELIVERY_METHOD', 'smtp').to_sym
  
    config.action_dispatch.default_headers = {
 -    'Server'                 => 'Mastodon',
 -    'X-Frame-Options'        => 'DENY',
 -    'X-Content-Type-Options' => 'nosniff',
 -    'X-XSS-Protection'       => '1; mode=block',
 -    'Permissions-Policy'     => 'interest-cohort=()',
 +    'Server'                  => 'Mastodon',
 +    'X-Frame-Options'         => 'DENY',
 +    'X-Content-Type-Options'  => 'nosniff',
 +    'X-XSS-Protection'        => '1; mode=block',
++    'Permissions-Policy'      => 'interest-cohort=()',
 +    'Referrer-Policy'         => 'same-origin',
 +    'Strict-Transport-Security' => 'max-age=63072000; includeSubDomains; preload',
 +    'X-Clacks-Overhead' => 'GNU Natalie Nguyen'
    }
  
    config.x.otp_secret = ENV.fetch('OTP_SECRET')
Simple merge
Simple merge
index 1d9488052938d968843c0092bc87480710e21843,b79ea620c803f34453f3408ed37d55e9a511232e..0af1a61a2ae7fd40ade25ffafe04b5ec0cc0b636
@@@ -72,13 -67,8 +72,12 @@@ defaults: &default
    activity_api_enabled: true
    peers_api_enabled: true
    show_known_fediverse_at_about_page: true
-   spam_check_enabled: true
 +  show_reblogs_in_public_timelines: false
 +  show_replies_in_public_timelines: false
 +  default_content_type: 'text/plain'
    show_domain_blocks: 'disabled'
    show_domain_blocks_rationale: 'disabled'
 +  outgoing_spoilers: ''
    require_invite_text: false
  
  development:
diff --cc db/schema.rb
Simple merge
diff --cc package.json
Simple merge
diff --cc yarn.lock
Simple merge