Commit Graph
100 Commits
Author SHA1 Message Date
Eugen Rochko 251bbf9728 Show remote reports in admin UI as coming from domain rather than user (#7347)
Fix #6994
2018-05-04 13:26:25 +02:00
Eugen Rochko a78b27c7cc Marginally improve convert/ffmpeg calls performance with posix-spawn (#7346) 2018-05-04 13:22:23 +02:00
Eugen Rochko d5fa4fbcd2 Revert "Do not override timestamps for incoming toots" (#7330)
* Revert "Weblate translations 20180503 (#7325)"

This reverts commit dfa6bccb64.

* Revert "Prevent timeline from moving when cursor is hovering over it (fixes #7278) (#7327)"

This reverts commit 58852695c8.

* Revert "Add pry-byebug (#7307)"

This reverts commit ab773e4d5f.

* Revert "Do not override timestamps for incoming toots (#7326)"

This reverts commit bd36791832.
2018-05-03 12:32:33 +02:00
Eugen Rochko a5293fdf61 Fix n+1 queries in StatusThreadingConcern (#7321) 2018-05-03 10:41:58 +02:00
Eugen Rochko a3d84e705a Fix cache_associated no longer working (#7320) 2018-05-03 10:41:41 +02:00
Eugen Rochko 28bd4b9800 Serialize webfinger XML with Ox instead of Nokogiri (#7319)
25ms -> 0.5ms
2018-05-02 22:28:46 +02:00
Eugen Rochko 658cbc9425 Improve PostStatusService performance (#7317)
Offload creation of local notifications to a worker. Remove two
redundant SQL queries from ProcessMentionsService, remove n+1
XML/JSON serialization via memoization
2018-05-02 22:10:57 +02:00
Eugen Rochko cb5b5cb5f7 Slightly reduce RAM usage (#7301)
* No need to re-require sidekiq plugins, they are required via Gemfile

* Add derailed_benchmarks tool, no need to require TTY gems in Gemfile

* Replace ruby-oembed with FetchOEmbedService

Reduce startup by 45382 allocated objects

* Remove preloaded JSON-LD in favour of caching HTTP responses

Reduce boot RAM by about 6 MiB

* Fix tests

* Fix test suite by stubbing out JSON-LD contexts
2018-05-02 18:58:48 +02:00
Eugen Rochko cae933510c Allow updating bio fields via PUT /api/v1/accounts/update_credentials (#7288)
Add raw bio fields to the source attribute on GET /api/v1/accounts/verify_credentials
2018-05-02 15:57:37 +02:00
Eugen Rochko f62539ce5c Remove most behaviour disparities between blocks and mutes (#7231)
* Remove most behaviour disparities between blocks and mutes

The only differences between block and mute should be:

- Mutes can optionally NOT affect notifications
- Mutes should not be visible to the muted

Fix #7230
Fix #5713

* Do not allow boosting someone you blocked

Fix #7248

* Do not allow favouriting someone you blocked

* Fix nil error in StatusPolicy
2018-05-02 15:50:20 +02:00
Eugen Rochko c5dcd7d836 Speed up test suite by not generating RSA keys in test environment (#7296)
One RSA keypair for all fabricated test accounts is enough
2018-05-02 15:45:24 +02:00
Eugen Rochko 965345316f Guard against nil URLs in Request class (#7284)
Fix #7265
2018-05-02 15:44:22 +02:00
Eugen Rochko 705f1d7bf1 Fix missing updated_at attribute on emoji EntityCache (#7297)
Just don't try to save space by only selecting few attributes. If
anyone is wondering, this is needed because the emoji entity cache
is not really only used for entities, it's accessed again to
generate Emoji tags in ActivityPub/OStatus, so a lot more properties
are used than what is needed in HTML alone...
2018-04-30 22:49:33 +02:00
Eugen Rochko f62ee1ddb0 Disable API access when login is disabled (#7289) 2018-04-30 09:13:14 +02:00
Eugen Rochko 295e3ef02b Fix missing domain attribute in EntityCache for emoji (#7290) 2018-04-30 09:12:55 +02:00
Eugen Rochko 54f34d3f2a Return HTTP 410 for suspended accounts in GET /api/v1/accounts/:id (#7287)
Fix #7243
2018-04-30 09:12:36 +02:00
Eugen Rochko da61352fab Fix "Show more" URL on paginated threads for remote statuses (#7285)
* Fix URL of "Show more" link in paginated threads (ancestors side)

Increase item limits in threads

Fix #7268

* Fix "Show more" link in paginated threads (descendants side)
2018-04-30 01:59:42 +02:00
Eugen Rochko a872392cd9 Add entity cache (#7271)
* Add entity cache

Use a caching layer for mentions and custom emojis that are
dynamically extracted from text.

Reduce duplicate text extractions

* Fix code style issue
2018-04-27 01:38:10 +02:00
Eugen Rochko 63553c6b5c Add support for separate Redis for cache (#7272)
* Add support for separate Redis for cache

CACHE_REDIS_URL to allow using a different Redis server for cache
purposes, with cache-specific configuration such as key eviction

* Fix code style issues
2018-04-27 01:37:59 +02:00
Eugen Rochko 9d4710ed00 Add RSS feeds for end-users (#7259)
* Add RSS feed for accounts

* Add RSS feeds for hashtags

* Fix code style issues

* Fix code style issues
2018-04-25 02:10:02 +02:00
Eugen Rochko 7db7d68136 Detect and prevent image bombs, max. processable dimension 4096^2 (#7229) 2018-04-23 09:16:38 +02:00
Eugen Rochko 660cb058e1 Improve relative timestamps in web UI (#7233)
Use short instead of numeric month, display year when different year

E.g.: "Apr 4" instead of "4/4", "Apr 4, 2017" if different year
2018-04-23 00:43:53 +02:00
Eugen Rochko 05fb6f096d Resize images before upload in web UI to reduce bandwidth (#7223)
* Resize images before upload in web UI to reduce bandwidth

Fix #7218

* Fix issues

* Do not resize GIFs in JS
2018-04-23 00:43:36 +02:00
Eugen Rochko 75c4ab9d12 Remove "nsfw" category for sensitive statuses in OStatus serializer (#7048)
Fix #7011
2018-04-22 22:09:03 +02:00
Eugen Rochko 4ca2f73b12 Rescue Mastodon::LengthValidationError in Remoteable (#7228)
Fix #7198 by allowing records with optional attachments to save
2018-04-22 15:42:00 +02:00
Eugen Rochko bfe26ef67b Force convert to JPG for preview card thumbnails to avoid animations (#7109)
* Force convert to JPG for preview card thumbnails to avoid animations

Fix #7093

* Conditionally convert to JPG only if original is GIF
Coalesce and strip on all formats to ensure no animated APNGs
2018-04-21 21:34:36 +02:00
Eugen Rochko a9c440637c Improve report layout (#7188)
* Use table for statuses in report

* Display reported account and reporter in the same table

* Split accounts and general report info into two tables again

* Redesign report statuses table, notes, merge notes and action log

* Remove unused translations

* Fix code style issue

* Fix code style issue

* Fix code style issue
2018-04-20 02:28:48 +02:00
Eugen Rochko ba917e15f6 Fix text color in "show more" link inside boost confirmation modal (#7183) 2018-04-19 02:36:31 +02:00
Eugen Rochko ff87d1bc3e Rescue SSL errors when processing mentions, remove useless line (#7184) 2018-04-19 00:53:31 +02:00
Eugen Rochko 07a7d5959c Fix missing "Administered by" when timeline preview disabled (#7161) 2018-04-17 13:51:14 +02:00
Eugen Rochko aab5581c43 Set Referrer-Policy to origin in web UI and public pages of private toots (#7162)
Fix #7115
2018-04-17 13:51:01 +02:00
Eugen Rochko bb58fc003b Fix warning about using SQL in order for Account#partitioned (#7159) 2018-04-17 13:50:48 +02:00
Eugen Rochko 78ed4ab75f Add bio fields (#6645)
* Add bio fields

- Fix #3211
- Fix #232
- Fix #121

* Display bio fields in web UI

* Fix output of links and missing fields

* Federate bio fields over ActivityPub as PropertyValue

* Improve how the fields are stored, add to Edit profile form

* Add rel=me to links in fields

Fix #121
2018-04-14 12:41:08 +02:00
Eugen Rochko 778562c223 Ensure SynchronizeFeaturedCollectionWorker is unique and clean up (#7043)
* Ensure SynchronizeFeaturedCollectionWorker is unique and clean up

Fix #7041

* Fix code style issue
2018-04-13 01:27:22 +02:00
Eugen Rochko 9e45b051cf When notification type filtered, ignore live updates for it (#7101)
Fix #5625
2018-04-13 01:20:04 +02:00
Eugen Rochko 45c9f16f71 Improve load gap styling in web UI (#7100) 2018-04-10 17:12:10 +02:00
Eugen Rochko 49bbef1202 Use RAILS_LOG_LEVEL to set log level of Sidekiq, too (#7079)
Fix #3565 (oops)
2018-04-10 16:08:28 +02:00
Eugen Rochko 80a944c882 Log rate limit hits (#7096)
Fix #7095
2018-04-10 01:20:18 +02:00
Eugen Rochko d4de2239b0 Add a circuit breaker for ActivityPub deliveries (#7053) 2018-04-07 21:36:58 +02:00
Eugen Rochko b5726def55 Forward deletes on the same path as reply forwarding (#7058)
* Forward deletes on the same path as reply forwarding

* Remove trailing whitespace
2018-04-07 18:54:46 +02:00
Eugen Rochko f1867a7388 Adjust privacy policy (#6666)
* Adjust privacy policy to be more specific to Mastodon

Fix #6613

* Change data retention of IP addresses from 5 years to 1 year

* Add even more information

* Remove all (now invalid) translations of the privacy policy

* Add information about archive takeout, remove pointless consent section

* Emphasis on DM privacy

* Improve wording

* Add line about data use for moderation purposes
2018-04-04 21:47:39 +02:00
Eugen Rochko 07176fed37 Add contact account to landing page ("Administered by") (#6984) 2018-04-04 01:11:26 +02:00
Eugen Rochko 36eac8ba90 Do not default SMTP verify mode to "peer", default to "none" (#6996) 2018-04-02 19:19:51 +02:00
Eugen Rochko f890d2a766 Support all ActivityPub actor types (#6997)
Fix #6973
2018-04-02 02:10:53 +02:00
Eugen Rochko 33513753b9 Fix unpermitted parameters warning when generating pagination URLs (#6995) 2018-04-02 02:09:50 +02:00
Eugen Rochko 2a90da1837 Fix UniqueUsernameValidator comparison (#6926)
Comparison was downcasing only one side, therefore if previously
existing account had a non-lowercase spelling, it would be ignored
when checking for duplicates.

New rake task `mastodon:maintenance:find_duplicate_usernames` will
help find constraint violations that might have occured from the
presence of this bug.

Bump version to 2.3.3
2018-03-27 04:33:57 +02:00
Eugen Rochko 6cc432bbc4 Bump version to 2.3.2 2018-03-22 14:13:46 +01:00
Eugen Rochko dafae9818d Bump version to 2.3.2rc5 2018-03-22 11:31:52 +01:00
Eugen Rochko 9fe1619db9 Do not re-query mentions from serializers (#6858)
Fix performance regression from #6836
2018-03-22 11:31:17 +01:00
Eugen Rochko da70aca28e Restore username validation to disallow dots, for now (#6863)
Usernames with dots in them do not work with routes, because the dot usually separates the desired page format (e.g. json). I don't want to mess with changing route constraints for this patch release.
2018-03-22 11:30:22 +01:00
Eugen Rochko f66a786029 Hide floating action button on thread views (#6859) 2018-03-22 09:33:14 +01:00
Eugen Rochko 93897134ca Permit dots in usernames with conditions (#6844)
* Permit dots in usernames with conditions

- Dot cannot be the start or end of username
- a.lice and al.ice are considered the same during sign-up

* Fix regex mixin flags
2018-03-21 10:26:53 +01:00
Eugen Rochko f64af6473f Bump version to 2.3.2rc4 2018-03-20 23:49:24 +01:00
Eugen Rochko ac49c7932d Add LDAP_TLS_NO_VERIFY option, don't require LDAP_ENABLED outside .env (#6845)
Fix #6816, fix #6790
2018-03-20 19:41:51 +01:00
Eugen Rochko 9381a7d9d5 Use username/domain to match existing accounts in ActivityPub (#6842)
See also: #6837, #6667
2018-03-20 14:57:46 +01:00
Eugen Rochko 74c39fada0 Bump version to 2.3.2rc3 2018-03-19 12:20:57 +01:00
Eugen Rochko f02411da40 Ignore media validation when attaching to status during processing (#6822)
Fix #6821
2018-03-19 01:51:19 +01:00
Eugen Rochko a568e3ca8e Revert #6479, hide sensitive text/images from OpenGraph previews (#6818)
Display summary of attachments in description, and mark up content
warning if present, e.g.:

    Attached: 3 images · Content warning: Dota 2

When text is not supposed to be hidden, it looks more like:

    Attached: 3 images

    Here is the text of the toot

With #6817, multilinguagility should be assured...
2018-03-18 20:33:07 +01:00
Eugen Rochko 3b440bd5af Fix elephant graphic being draggable and selectable (#6819) 2018-03-18 20:32:44 +01:00
Eugen Rochko 39f27b6cf3 If DEFAULT_LOCALE is set, enforce it instead of HTTP request locale (#6817)
Fix #6784
2018-03-18 16:57:04 +01:00
Eugen Rochko 092f1df9d0 Bump version to 2.3.2rc2 2018-03-17 15:28:52 +01:00
Eugen Rochko 844616e950 Re-add git and nodejs-npm to Dockerfile (#6810)
Fix #6809

I don't know why, either
2018-03-17 15:28:09 +01:00
Eugen Rochko 40871caa4b Revert "Upgrade Paperclip to version 6.0.0" (#6807)
* Revert "Bump version to 2.3.2rc1"

This reverts commit cdf8b92fea.

* Revert "Downgrade Dockerfile to Ruby 2.4.3 on Alpine 3.6 (#6806)"

This reverts commit 0074cad44f.

* Revert "Handle Mastodon::HostValidationError when pulling remoteable assets (#6782)"

This reverts commit 4a0a19fe54.

* Revert "Correct the reference to user's password in mastodon:add_user task (#6800)"

This reverts commit 338bff8b93.

* Revert "Upgrade Paperclip to version 6.0.0 (#6754)"

This reverts commit b88fcd53f7.
2018-03-17 14:20:35 +01:00
Eugen Rochko cdf8b92fea Bump version to 2.3.2rc1 2018-03-17 14:07:00 +01:00
Eugen Rochko 0074cad44f Downgrade Dockerfile to Ruby 2.4.3 on Alpine 3.6 (#6806)
Fix 6734
2018-03-17 14:06:25 +01:00
Eugen Rochko 2ef1ce1182 Bump version to 2.3.1 2018-03-13 15:50:15 +01:00
Eugen Rochko eb2425b53b Hide loading bar on status interactions (#6774) 2018-03-13 14:30:01 +01:00
Eugen Rochko 79d3a8553f Bump version to 2.3.1rc3 2018-03-13 09:21:21 +01:00
Eugen Rochko 7709556673 Merge branch 'kagucho-spoiler' 2018-03-13 09:18:27 +01:00
Eugen Rochko f0ae6b4cc5 Merge branch 'spoiler' of git://github.com/kagucho/mastodon into kagucho-spoiler 2018-03-13 09:18:11 +01:00
Eugen Rochko 9e3a6d6784 Log BackupWorker backtrace, delete Backup if retries exhausted (#6769) 2018-03-13 08:15:24 +01:00
Eugen Rochko 8bf3e750ab Fix #6757: Adjust RTL styles for landing page (#6768) 2018-03-13 08:14:08 +01:00
Eugen Rochko 386365090c Fix #6762: Do not overwrite some status attributes in reducer (#6767) 2018-03-13 07:16:43 +01:00
Eugen Rochko f89ff65ec7 Bump version to 2.3.1rc2 2018-03-12 12:48:49 +01:00
Eugen Rochko 4f7f6b3922 Fix follow relationships not loading after notifications fetch (#6746) 2018-03-12 03:20:56 +01:00
Eugen Rochko ab27dccba5 Bump version to 2.3.1rc1 2018-03-11 15:13:13 +01:00
Eugen Rochko 56eb5c3f34 Fix focal point cropping in MediaGallery, fix focal point modal (#6740)
* Use object-position with object-fit instead of JS top/left

* Fix focal point modal
2018-03-11 15:12:33 +01:00
Eugen Rochko 1aaec701bb Fix #6715: Make catalan words with the L geminate letter work in hashtags (#6741) 2018-03-11 14:55:49 +01:00
Eugen Rochko b6003afcdb Add show more/less toggle for entire threads in web UI (#6733)
Fix #1258
2018-03-11 09:52:59 +01:00
Eugen Rochko 4476a45444 Fix #6717: Do not double html-encode page titles (#6720) 2018-03-10 11:43:20 +01:00
Eugen Rochko 6e309f5e45 Bump version to 2.3.0 2018-03-09 12:59:58 +01:00
Eugen Rochko e5f18ace2a When inside Docker, output saved configuration during mastodon:setup (#6711) 2018-03-09 11:52:18 +01:00
Eugen Rochko 11697d6894 Fix thumbnail not filling entire space sometimes (#6709) 2018-03-09 11:33:05 +01:00
Eugen Rochko 675b8fea53 Adjust suggested ES host in .env sample for docker-compose config (#6710) 2018-03-09 11:32:55 +01:00
Eugen Rochko ff44b2e92d Add missing meta description to profiles, some other SEO stuff (#6706)
- Add missing meta description to profiles
- Add canonical rel link to landing page
- Remove linebreaks from title tags
- Add username to profile title
- Add toots/following/followers to profile description tags
- Add next/prev rel links to profiles
- Do not index follower/following variants of profiles
2018-03-09 00:35:07 +01:00
Eugen Rochko bd077ad7d9 Bump version to 2.3.0rc3 2018-03-08 11:19:02 +01:00
Eugen Rochko a29d409e20 If login redirects to omniauth, redirect logout to root_path (#6694)
Fix #6670
2018-03-08 11:18:26 +01:00
Eugen Rochko 5acd5315f2 Improve styling of closed registrations message, rename button (#6695)
* Improve styling of closed registrations message, rename button

"Sign up on another server"

Fix #6683

* Adjust styling of closed registrations message
2018-03-08 11:10:37 +01:00
Eugen Rochko b79ab15859 When enabled, always display media in gallery. Also: click to reveal (#6692)
Fix #6677
2018-03-08 08:57:21 +01:00
Eugen Rochko 77406d3a09 Display AttachmentList in notifications (#6693) 2018-03-08 08:22:04 +01:00
Eugen Rochko 510c9049c7 For now, put a "." into no-text statuses with media for backcompat (#6691) 2018-03-08 08:20:49 +01:00
Eugen Rochko 64db9ed5f6 After blocking domain with reject_media, invalidate cache (#6679)
Media attachments are part of the association cache of statuses,
since they are presumed to be immutable. Unless this cache is
cleared manually, the statuses will continue to look like they
have media embedded.
2018-03-08 06:59:42 +01:00
Eugen Rochko 86a9de6753 Display AttachmentList in timelines in compact style when media missing (#6680) 2018-03-08 04:54:26 +01:00
Eugen Rochko 4ca60c665e Bump version to 2.3.0rc2 2018-03-07 12:06:23 +01:00
Eugen Rochko b170627ceb Fix cover behaviour of thumbnails that are wider than taller (#6678) 2018-03-07 12:02:05 +01:00
Eugen Rochko a1b065700a Fix focal point modals broken by #5956 (#6676) 2018-03-07 12:01:53 +01:00
Eugen Rochko 8de048fcdb In wide layout, columnize Mastodon features on landing page (#6674) 2018-03-07 08:59:27 +01:00
Eugen Rochko cfa9b6e13a Remove text requirement when media attached from statuses (#6672) 2018-03-07 08:28:52 +01:00
Eugen Rochko 89a52d6280 Fix wrong target URIs in ActivityPub Add/Remove (#6668) 2018-03-07 05:58:24 +01:00
Eugen Rochko e6520c0270 Fix #6657 - Use target instead of origin in Remove activity (#6664) 2018-03-07 03:54:46 +01:00