commit
7e52095f9e
@ -0,0 +1,19 @@
|
|||||||
|
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb
|
||||||
|
index cb5629337..bf7b7edb0 100644
|
||||||
|
--- a/config/initializers/content_security_policy.rb
|
||||||
|
+++ b/config/initializers/content_security_policy.rb
|
||||||
|
@@ -16,11 +16,13 @@ media_host ||= host_to_url(ENV['S3_CLOUDFRONT_HOST'])
|
||||||
|
media_host ||= host_to_url(ENV['S3_HOSTNAME']) if ENV['S3_ENABLED'] == 'true'
|
||||||
|
media_host ||= assets_host
|
||||||
|
|
||||||
|
+google_fonts_host = "https://fonts.gstatic.com" # Google Fonts
|
||||||
|
+
|
||||||
|
Rails.application.config.content_security_policy do |p|
|
||||||
|
p.base_uri :none
|
||||||
|
p.default_src :none
|
||||||
|
p.frame_ancestors :none
|
||||||
|
- p.font_src :self, assets_host
|
||||||
|
+ p.font_src :self, assets_host, google_fonts_host
|
||||||
|
p.img_src :self, :https, :data, :blob, assets_host
|
||||||
|
p.style_src :self, assets_host
|
||||||
|
p.media_src :self, :https, :data, assets_host
|
@ -0,0 +1,28 @@
|
|||||||
|
diff --git a/app/models/account.rb b/app/models/account.rb
|
||||||
|
index 28bd828b0..d144ef540 100644
|
||||||
|
--- a/app/models/account.rb
|
||||||
|
+++ b/app/models/account.rb
|
||||||
|
@@ -92,7 +92,7 @@ class Account < ApplicationRecord
|
||||||
|
validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? && actor_type != 'Application' }
|
||||||
|
validates :display_name, length: { maximum: 30 }, if: -> { local? && will_save_change_to_display_name? }
|
||||||
|
validates :note, note_length: { maximum: 500 }, if: -> { local? && will_save_change_to_note? }
|
||||||
|
- validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }
|
||||||
|
+ validates :fields, length: { maximum: 12 }, if: -> { local? && will_save_change_to_fields? }
|
||||||
|
|
||||||
|
scope :remote, -> { where.not(domain: nil) }
|
||||||
|
scope :local, -> { where(domain: nil) }
|
||||||
|
diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb
|
||||||
|
index a32727796..b5e380cb4 100644
|
||||||
|
--- a/app/validators/poll_validator.rb
|
||||||
|
+++ b/app/validators/poll_validator.rb
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class PollValidator < ActiveModel::Validator
|
||||||
|
- MAX_OPTIONS = 4
|
||||||
|
- MAX_OPTION_CHARS = 50
|
||||||
|
+ MAX_OPTIONS = 12
|
||||||
|
+ MAX_OPTION_CHARS = 180
|
||||||
|
MAX_EXPIRATION = 1.month.freeze
|
||||||
|
MIN_EXPIRATION = 5.minutes.freeze
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/public/robots.txt b/public/robots.txt
|
||||||
|
index 771bf2160..e5cbdc31f 100644
|
||||||
|
--- a/public/robots.txt
|
||||||
|
+++ b/public/robots.txt
|
||||||
|
@@ -3,3 +3,17 @@
|
||||||
|
User-agent: *
|
||||||
|
Disallow: /media_proxy/
|
||||||
|
Disallow: /interact/
|
||||||
|
+Allow: /about
|
||||||
|
+Disallow: /
|
||||||
|
+Disallow: /users/*/followers
|
||||||
|
+Disallow: /users/*/following
|
||||||
|
+Disallow: /@*/media
|
||||||
|
+Disallow: /@*/with_replies
|
||||||
|
+Disallow: /@*/tagged/*
|
||||||
|
+Disallow: /media_proxy/*
|
||||||
|
+Disallow: /emoji/*
|
||||||
|
+Disallow: /packs/*
|
||||||
|
+Disallow: /sounds/*
|
||||||
|
+Disallow: /system/*
|
||||||
|
+Disallow: /avatars/*
|
||||||
|
+Disallow: /headers/*
|
@ -0,0 +1,35 @@
|
|||||||
|
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js
|
||||||
|
index e641d59f4..7aab42479 100644
|
||||||
|
--- a/app/javascript/mastodon/features/compose/components/compose_form.js
|
||||||
|
+++ b/app/javascript/mastodon/features/compose/components/compose_form.js
|
||||||
|
@@ -90,7 +90,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
|
const fulltext = this.getFulltextForCharacterCounting();
|
||||||
|
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
|
||||||
|
|
||||||
|
- return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 500 || (isOnlyWhitespace && !anyMedia));
|
||||||
|
+ return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 2000 || (isOnlyWhitespace && !anyMedia));
|
||||||
|
};
|
||||||
|
|
||||||
|
handleSubmit = (e) => {
|
||||||
|
@@ -280,7 +280,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='character-counter__wrapper'>
|
||||||
|
- <CharacterCounter max={500} text={this.getFulltextForCharacterCounting()} />
|
||||||
|
+ <CharacterCounter max={2000} text={this.getFulltextForCharacterCounting()} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb
|
||||||
|
index e107912b7..5e2641db7 100644
|
||||||
|
--- a/app/validators/status_length_validator.rb
|
||||||
|
+++ b/app/validators/status_length_validator.rb
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class StatusLengthValidator < ActiveModel::Validator
|
||||||
|
- MAX_CHARS = 500
|
||||||
|
+ MAX_CHARS = 2000
|
||||||
|
URL_PLACEHOLDER_CHARS = 23
|
||||||
|
URL_PLACEHOLDER = 'x' * 23
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/config/themes.yml b/config/themes.yml
|
||||||
|
index 9c21c9459..77a8a5538 100644
|
||||||
|
--- a/config/themes.yml
|
||||||
|
+++ b/config/themes.yml
|
||||||
|
@@ -1,3 +1,11 @@
|
||||||
|
default: styles/application.scss
|
||||||
|
contrast: styles/contrast.scss
|
||||||
|
mastodon-light: styles/mastodon-light.scss
|
||||||
|
+coffee-dark: styles/coffee-dark.scss
|
||||||
|
+coffee-light: styles/coffee-light.scss
|
||||||
|
+oe7drt-blue: styles/oe7drt-blue.scss
|
||||||
|
+oe7drt-greeny: styles/oe7drt-greeny.scss
|
||||||
|
+dark-red: styles/dark-red.scss
|
||||||
|
+light-red: styles/light-red.scss
|
||||||
|
+#cute: styles/cute.scss
|
||||||
|
+#droid: styles/droid.scss
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue