Commit Graph

92 Commits (04166c4a35c97f5540252617c7858bf20d315a7e)

Author SHA1 Message Date
Eugen Rochko 13c16b4e95 Likely fix #2458, fix #2031 - handle out-of-order deletes for statuses (#2734)
* Likely fix #2458, fix #2031 - handle out-of-order deletes for statuses

If a delete arrives before the original status, cache that information
for 6h, and if the original status arrives in that window, ignore it

* Add test case
8 years ago
Eugen Rochko bafd22ecf4 Fix #2706 - Always respond with 200 to PuSH payloads (#2733)
Fix #2196 - Respond with 201 when Salmon accepted, 400 when unverified
Fix #2629 - Correctly handle confirm_domain? for local accounts
Unify rules for extracting author acct from XML, prefer <email>, fall back
to <name> + <uri> (see also #2017, #2172)
8 years ago
yhirano 8325866c61 Downgrade rubocop 0.48.1 => 0.46.0 (#2628)
* downgrade rubocop 0.48.1 => 0.46.0

* exclude vendor/**/* from rubocop target files

* add frozen_string_literal comment line

* fix percent literal delimited by ( and )

* fix alignment

* remove comment disabling unknown cop
8 years ago
Eugen Rochko 2af4f3c4e2 Improve shared status verification (#2525)
* Instead of parsing shared status contents verbatim, make roundtrip
to purported original URL. Confirm that the "original" URL is from the
same domain as the author it claims to be from.

* Fix obvious typo, add comment

* Use URI look-up first

* Add test, update Goldfinger dependency to make less useless HTTP requests per Webfinger lookup
8 years ago
Eugen 17c591ffba Punycode URI normalization (#2370)
* Fix #2119 - Whenever about to send a HTTP request, normalize the URI

* Add test for IDN request in FetchLinkCardService

* Perform IDN normalization on domains before they are stored in the DB
8 years ago
Eugen e4af4898de Add language detection (#1772)
* Add language detection via WhatLanguage and (de)serialization of it through Atom

* Fix default language in ProcessFeedService

* Re-add newline before 'react-rails' Gem to fix groupings

Fixes Code Climate issue
8 years ago
Eugen babbb2135e Fix #1813 - Alleviate extra requests when processing mentions (#1938)
The <link rel="mentioned" /> tag refers to accounts by href. So we were
matching the DB by the url attribute, and falling back to HTTP look-up.
However, GS and Mastodon use profile URLs as URIs, too, and the match
for that was missing. This could potentially alleviate some extra network
requests
8 years ago
Eugen 5d710b1139 Make file attachment on MediaAttachment optional (#1865)
Create MediaAttachment but without actual file download when domain is blocked with reject_media set to true
Clean up old media files when creating a new domain block with reject_media set to true
Return remote_url in media attachments API if local file is not present
Undo domain block action in admin UI
Ability to enable reject_media from admin UI
8 years ago
ThibG a9529d3b4b Allow running mastodon on a different domain as the one used for identifying users (#1267)
* Allow running mastodon on a different domain as the one used for identifying users

* Alter documentation of WEB_DOMAIN to make clear it shouldn't be used unless the admin knows what they are doing

* Compare to web_domain instead of local_domain when dealing with feeds/API

* Correctly identify mentions to local accounts

Mentions URLs point to the person's web profile, i.e., the user page served on WEB_DOMAIN.
8 years ago
Eugen 982fef811e Fix #1141, fix #1126 - Avatar/profile info fetching (#1215)
* Fix #1141, fix #1126 - Work through UpdateRemoteProfileService for both <feed> and <entry> top-level tags

* Improve code quality, remove line unrelated to fix
8 years ago
Eugen Rochko 5442083b3c Split SalmonWorker into smaller parts, move profile updating into another job 8 years ago
Eugen Rochko a5daa806f2 Fix casuality of processing remote mentions such that notifications
about them would be processed only after the entire status is processed
8 years ago
Eugen Rochko 53ae431867 Skip remote media URLs that don't have a hostname 8 years ago
Eugen Rochko dc851c922e Mentions in private statuses allow mentioned people to see them 8 years ago
Eugen Rochko 6331ed16e5 Fix #614 - extra reply-boolean on statuses to account for cases when replied-to
status is not in the system at time of distribution; fix #607 - reset privacy
settings to defaults when cancelling replies
8 years ago
Eugen Rochko 450ad43180 Do not run FetchLinkCardService on local URLs, increase file size limit to 8MB,
fix ProcessFeedService pushing status into distribution if called a second time
while the first is still running (i.e. when a PuSH comes after a Salmon slap),
fix not running escape on spoiler text before emojify
8 years ago
Eugen Rochko 3beb24ad55 Use <summary> to encode content warnings instead 8 years ago
Eugen Rochko 999cde94a6 Instead of using spoiler boolean and spoiler_text, simply check for non-blank spoiler_text
Federate spoiler_text using warning attribute on <content /> instead of a <category term="spoiler" />
Clean up schema file from accidental development migrations
8 years ago
Eugen Rochko 434cf8237e Optional domain block attribute that prevents media attachments from being downloaded 8 years ago
Eugen Rochko 9bd3b11cfb Instead of refusing to create accounts, domain blocks auto-suspend new accounts from that domain 8 years ago
Eugen Rochko 05abd977c1 Fix preview cards layout, do preview card crawling for remote statuses 8 years ago
Eugen f63f0c4625 Fix too late return 8 years ago
Eugen Rochko 7951e7ffd5 Add ruby version to Gemfile, move devDependencies in package.json to dependencies,
fix bug in process feed service
8 years ago
Eugen Rochko 668013265c Restoring old async behaviour of thread resolving as it proved to be more robust 8 years ago
Eugen Rochko f90133d2ad Thread resolving no longer needs to be separate from ProcessFeedService,
since that is only ever called in the background
8 years ago
Eugen Rochko 39cc9fde8a Add account suspension 8 years ago
Eugen Rochko 14bd46946d Per-status control for unlisted mode, also federation for unlisted mode
Fix #233, fix #268
8 years ago
Eugen Rochko 2cb3dc5e5a Update hub URL and re-subscribe if hub URL changes 8 years ago
Eugen Rochko 45c7ee39b3 Remove unneeded indices, improve error handling in background workers, don't needlessly reload reblogged status, send Devise e-mails asynchronously 8 years ago
Eugen Rochko 29b12f9e0a Call NotifyService about remote reblogs 8 years ago
Eugen Rochko da2ef4d676 Adding unified streamable notifications 8 years ago
Eugen Rochko 2c58e7e06a Catch validation errors in ProcessFeedService so that one failing entry wouldn't stop others from going through 8 years ago
Eugen Rochko e4f56fa942 Don't create attachments if remote file cannot be fetched 8 years ago
Eugen Rochko fdc17bea58 Fix rubocop issues, introduce usage of frozen literal to improve performance 8 years ago
Eugen Rochko 7ce4670164 Force utf-8 encoding when processing XML 8 years ago
Eugen Rochko aabf884c5f Discard misattributed remote statuses, improve timelines filter 8 years ago
Eugen Rochko b6832553ff Adding more logging 8 years ago
Eugen Rochko cff0b03cbb Fix for thread resolve service and process feed service url method 8 years ago
Eugen Rochko 2f21f4cc01 Fix region setting for AWS gem 8 years ago
Eugen Rochko 096bfbad96 Fix typo 8 years ago
Eugen Rochko 11cbe49ffc ProcessFeedService refactor 8 years ago
Eugen Rochko dbe00a4156 Improved configuration from ENV, cleaned up timeline filter methods
to be more readable, add extra logging to process feed service
8 years ago
Eugen Rochko 48b9619439 Adding hashtags 8 years ago
Eugen Rochko 91144d46ec Fix duplication of media attachments when a remote status reblogs a local one 8 years ago
Eugen Rochko c257b29d86 Fix up a few exceptions 8 years ago
Eugen Rochko 77efdfa110 Fixing namespaces issue 8 years ago
Eugen Rochko 87b618ab02 Fix namespace parsing in Atom feeds 8 years ago
Eugen Rochko 38ce960ff9 Use Account#find_remote method when possible 8 years ago
Eugen Rochko cfba03bd27 Don't return unsaved status from ProcessFeedService 8 years ago
Eugen Rochko 81065bc06c Adding test for ProcessFeedService 8 years ago