Commit Graph

1764 Commits (6a251a7dd845a0363f690ae3bc7118b01d009985)

Author SHA1 Message Date
anna 6a251a7dd8
add backend support for status emoji reactions
turns out we can just reuse the code for
announcement reactions.
2 years ago
anna 416d42e949
Revert "add emoji reaction database model"
I didn't intend to commit this to main and it's
kind of a work in progress anyway.
This reverts commit 0da3340f0d.
2 years ago
anna 0da3340f0d
add emoji reaction database model 2 years ago
Jeremy Kescher 41ce71cc92
Merge remote-tracking branch 'upstream/main' into develop 2 years ago
Claire ff42233aae Merge branch 'main' into glitch-soc/merge-upstream 2 years ago
David Leadbeater 69378eac99
Don't allow URLs that contain non-normalized paths to be verified (#20999)
* Don't allow URLs that contain non-normalized paths to be verified

This stops things like https://example.com/otheruser/../realuser where
"/otheruser" appears to be the verified URL, but the actual URL being
verified is "/realuser" due to the "/../".

Also fix a test to use 'https', so it is testing the right thing, now
that since #20304 https is required.

* missing do
2 years ago
Jeremy Kescher b221a857f7
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	.github/workflows/build-image.yml
2 years ago
Claire aec61a703f Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.github/workflows/build-image.yml`:
  Upstream changed how docker images were built, including how
  they were cached.
  I don't know much about it, so applied upstream's changes.
- `app/controllers/admin/domain_blocks_controller.rb`:
  The feature, that was in glitch-soc, got backported upstream.
  It also had a few fixes upstream, so those have been ported!
- `app/javascript/packs/admin.js`:
  Glitch-soc changes have been backported upstream. As a result,
  some code from `app/javascript/core/admin.js` got added upstream.
  Kept our version since our shared Javascript already has that feature.
- `app/models/user.rb`:
  Upstream added something to distinguish unusable and unusable-because-moved
  accounts, while glitch-soc considers moved accounts usable.
  Took upstream's code for `functional_or_moved?` and made `functional?`
  call it.
- `app/views/statuses/_simple_status.html.haml`:
  Upstream cleaned up code style a bit, on a line that we had custom changes
  for.
  Applied upstream's change while keeping our change.
- `config/initializers/content_security_policy.rb`:
  Upstream adopted one CSP directive we already had.
  The conflict is because of our files being structurally different, but the
  change itself was already part of glitch-soc.
  Kept our version.
2 years ago
Claire ab7d99e035
Fix various issues with domain block import (#1944)
- stop using Paperclip for processing domain allow/block imports
- stop leaving temporary files
- better error handling
- assume CSV files are UTF-8-encoded
2 years ago
lenore gilbert c373148b3d
Support for import/export of instance-level domain blocks/allows for 4.x w/ additional fixes (#20597)
* Allow import/export of instance-level domain blocks/allows (#1754)

* Allow import/export of instance-level domain blocks/allows.
Fixes #15095

* Pacify circleci

* Address simple code review feedback

* Add headers to exported CSV

* Extract common import/export functionality to
AdminExportControllerConcern

* Add additional fields to instance-blocked domain export

* Address review feedback

* Split instance domain block/allow import/export into separate pages/controllers

* Address code review feedback

* Pacify DeepSource

* Work around Paperclip::HasAttachmentFile for Rails 6

* Fix deprecated API warning in export tests

* Remove after_commit workaround

(cherry picked from commit 94e98864e3)

* Add confirmation page when importing blocked domains (#1773)

* Move glitch-soc-specific strings to glitch-soc-specific locale files

* Add confirmation page when importing blocked domains

(cherry picked from commit b91196f4b7)

* Fix authorization check in domain blocks controller

(cherry picked from commit 7527937758)

* Fix error strings for domain blocks and email-domain blocks

Corrected issue with non-error message used for Mastodon:NotPermittedError in Domain Blocks
Corrected issue Domain Blocks using the Email Domain Blocks message on ActionContoller::ParameterMissing
Corrected issue with Email Domain Blocks using the not_permitted string from "custom emojii's"

* Ran i18n-tasks normalize to address test failure

* Removed unused admin.export_domain_blocks.not_permitted string

Removing unused string as indicated by Check i18n

* Fix tests

(cherry picked from commit 9094c2f52c)

* Fix domain block export not exporting blocks with only media rejection

(cherry picked from commit 26ff48ee48)

* Fix various issues with domain block import

- stop using Paperclip for processing domain allow/block imports
- stop leaving temporary files
- better error handling
- assume CSV files are UTF-8-encoded

(cherry picked from commit cad824d8f501b95377e4f0a957e5a00d517a1902)

Co-authored-by: Levi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Claire 00b2720ef0
Change automatic post deletion configuration to be accessible to redirected users (#20774)
Fixes #20550
2 years ago
Claire 0cc77263fc
Change batch account suspension to create a strike (#20897) 2 years ago
Jeremy Kescher 122870cb6b
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	config/initializers/rack_attack.rb
#	lib/mastodon/version.rb
2 years ago
Claire 32c70d2f09 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/views/admin/announcements/edit.html.haml`:
  Upstream change too close to theming-related glitch-soc change.
  Ported upstream changes.
- `app/views/admin/announcements/new.html.haml`
  Upstream change too close to theming-related glitch-soc change.
  Ported upstream changes.
2 years ago
Eugen Rochko 552d69ad96
Fix error when invalid domain name is submitted (#19474)
Fix #19175
2 years ago
Eugen Rochko b31afc6294
Fix error when passing unknown filter param in REST API (#20626)
Fix #19156
2 years ago
Eugen Rochko 5c826c408d
Fix image type not being set after conversion for convertible image types (#20624) 2 years ago
Eugen Rochko 2e2ba39abf
Fix rules with same priority being sorted non-deterministically (#20623) 2 years ago
Jeremy Kescher c40b063bd4
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	.github/workflows/build-image.yml
#	lib/mastodon/version.rb
2 years ago
Claire 93912f0498 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/models/account.rb`:
  Conflict because we (glitch-soc) have disabled trending of posts without
  review.
  Discarded that upstream change.
- `app/views/admin/settings/discovery/show.html.haml`:
  Just an extra setting in glitch-soc.
  Kept that extra setting.
2 years ago
Jeong Arm c4c1bee880
Fix trendable status without review (#20214) 2 years ago
Emily Strickland 96f51e593f
Guard against error extracting `body` from URL (#20428)
If `Nokogiri::HTML(value).at_xpath('//body')` fails to find the `body` element, it will return `nil`. We can guard against that with an early return. Avoids calling `children` on `Nilclass` in those cases.
2 years ago
Eugen Rochko 9bc0a6c861
Fix metadata scrubbing removing color profile from images (#20389) 2 years ago
Claire 86f6631d28
Remove dead code and refactor status threading code (#20357)
* Remove dead code

* Remove unneeded/broken parameters and refactor descendant computation
2 years ago
Jeremy Kescher 4886f1955b
Merge remote-tracking branch 'upstream/main' into develop 2 years ago
Eugen Rochko c6c7c6223d
Change verification to only work for https links (#20304)
Fix #20242
2 years ago
Claire c118918520 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/models/custom_emoji.rb`:
  Not a real conflict, just upstream changing a line too close to
  a glitch-soc-specific validation.
  Applied upstream changes.
- `app/models/public_feed.rb`:
  Not a real conflict, just upstream changing a line too close to
  a glitch-soc-specific parameter documentation.
  Applied upstream changes.
2 years ago
Eugen Rochko 9965a23b04
Change link verification to ignore IDN domains (#20295)
Fix #3833
2 years ago
James Tucker 78a6b871fe
Improve performance by avoiding regex construction (#20215)
```ruby
10.times { p /#{FOO}/.object_id }
10.times { p FOO_RE.object_id }
```
2 years ago
Eugen Rochko 0cd0786aef
Revert filtering public timelines by locale by default (#20294) 2 years ago
Eugen Rochko e98833748e
Fix being able to spoof link verification (#20217)
- Change verification to happen in `default` queue
- Change verification worker to only be queued if there's something to do
- Add `link` tags from metadata fields to page header of profiles
2 years ago
Jeremy Kescher 5b797a34df
Merge remote-tracking branch 'upstream/main' into develop 2 years ago
Claire a8c854b3ea Merge branch 'main' into glitch-soc/merge-upstream 2 years ago
Jeremy Kescher ffa93fa157
Merge remote-tracking branch 'upstream/main' into develop 2 years ago
Postmodern ca80beb653
Micro-optimization: use `if`/`else` instead of `Array#compact` and `Array#min` (#19906)
* Technically `if`/`else` is faster than using `[value1, value2].compact.min` to find the lesser of two values, one of which may be `nil`.
2 years ago
Claire bbf74498f5
Fix validation error in SynchronizeFeaturedTagsCollectionWorker (#20018)
* Fix followers count not being updated when migrating follows

Fixes #19900

* Fix validation error in SynchronizeFeaturedTagsCollectionWorker

Also saves remote user's chosen case for hashtags

* Limit remote featured tags before validation
2 years ago
Claire be7032b9cf Merge branch 'main' into glitch-soc/merge-upstream 2 years ago
Postmodern 106648b456
Micro-optimization: only split `acct` into two Strings (#19901)
* Since `acct` is split by `@` and assigned to `username` and `domain`, we only need to split `acct` into two Strings.
2 years ago
Claire 6c0a6097ff Merge branch 'main' into glitch-soc/merge-upstream 2 years ago
nightpool 54f0f1b9ef
Skip Webfinger cache during migrations as well (#19883) 2 years ago
Jeremy Kescher 03f50f2f00
Merge remote-tracking branch 'upstream/main' into develop
# Conflicts:
#	app/javascript/flavours/glitch/features/ui/components/link_footer.js
#	lib/mastodon/version.rb
#	public/avatars/original/missing.png
2 years ago
Claire 0ad919b192 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/javascript/mastodon/features/compose/components/poll_form.js`:
  glitch-soc change because of having changed the default number of
  available poll options.
  Applied upstream's changes while keeping glitch-soc's default number of
  poll options.
- `public/oops.png`:
  We had a minor graphics change, probably not worth diverging from upstream.
  Took upstream version.
2 years ago
Eugen Rochko 3151b260e2
Fix not using GIN index for account search queries (#19830) 2 years ago
Claire c2170991c7
Fix reblogs being discarded after the reblogged status (#19731) 2 years ago
Eugen Rochko b1a219552e
Fix featured tags not saving preferred casing (#19732) 2 years ago
Claire 125322718b
Fix inaccurate admin log entry for re-sending confirmation e-mails (#19674)
Fixes #19593
2 years ago
txt-file 0f5e6dd02b
Add support for AVIF uploads (#19647) 2 years ago
Eugen Rochko ae07cfb868
Add support for HEIC uploads (#19618) 2 years ago
Eugen Rochko 15bae3e0e4
Change post-processing to be deferred only for large media types (#19617) 2 years ago
Eugen Rochko d0ba77047e
Change max. thumbnail dimensions to 640x360px (360p) (#19619) 2 years ago