Wykres commitów

73 Commity (96dba41c9b860da838624a6a44864814d690f609)

Autor SHA1 Wiadomość Data
Ryan Barrett 96dba41c9b
logging: use separate loggers for each module with their names 2022-02-11 22:38:56 -08:00
Ryan Barrett 535cf7ba70
add response body for inbox Accept activities
fixes https://console.cloud.google.com/errors/COew6ZH4_eyy2wE
2021-12-29 19:34:46 -08:00
Ryan Barrett 2f28be09be
convert %-formatted strings with args in logging.* calls to f-strings 2021-12-27 22:45:57 -08:00
Ryan Barrett fdd42ad1d4
override preferredUsername to always be the user's domain
...since Mastodon looks up [preferredUsername]@fed.brid.gy. see #77
2021-10-22 21:17:45 -07:00
Ryan Barrett 17d2066008
use @flask_util.cached 2021-08-28 07:18:46 -07:00
Ryan Barrett cf12817212
Flask port: error handling bug fixes, other misc tweaks 2021-08-16 11:47:31 -07:00
Ryan Barrett 32d9e2bf6c
move common.error() to webutil.flask_util
corresponds to snarfed/webutil@10c088cebd
2021-08-06 11:01:58 -07:00
Ryan Barrett e1aace0655
flask: use new regex URL route converter 2021-07-12 14:25:00 -07:00
Ryan Barrett 87e0cb8be7
flask: minor tweaks 2021-07-11 23:04:25 -07:00
Ryan Barrett 371a92a5db
flask: port XrdOrJrdHandler, finish porting webfinger 2021-07-11 16:30:14 -07:00
Ryan Barrett b8be570d66
flask: port activitypub 2021-07-10 08:07:40 -07:00
Ryan Barrett f26aed5cbb
flask: port salmon 2021-07-08 22:50:33 -07:00
Ryan Barrett 155be76bca
fix outbound AP headers and signature for Mastodon 3.2.1
https://github.com/snarfed/bridgy-fed/issues/68#issuecomment-720059695
2020-11-05 12:43:27 -08:00
Ryan Barrett d22903c3a7
update AP signature generation for Mastodon 3.2.1 changes
not working yet. :( details in https://github.com/snarfed/bridgy-fed/issues/68#issuecomment-714752553
2020-10-29 16:08:48 -07:00
Ryan Barrett dba533a14b
temporarily disable actually deleting Followers on AP Delete requests
mastodon.social sends Deletes for every Bridgy Fed account, all at basically the same time, and we have many Follower objects, so we have to do this table scan for each one, so the requests take a long time and end up spawning extra App Engine instances that we get billed for. and the Delete requests are almost never for followers we have. TODO: revisit this and do it right.
2020-10-11 08:35:14 -07:00
Ryan Barrett 9eae3087fd
404 requests for root paths that aren't user domains
lots of these are fediverse tools sniffing for specific implentations, eg mastodon etc.  /siteinfo.json, /status.php, etc.
2020-03-02 10:50:43 -08:00
Ryan Barrett 9784686b1c
implement AP Delete of actors when their accounts are deleted
fixes #63
2020-02-29 20:28:53 -08:00
Ryan Barrett df6b0b58ba
unify request handler classes and handle_exception; move away from HOST[_URL]
fixes:
* https://console.cloud.google.com/errors/CN68rO-5sOK9cQ
* https://console.cloud.google.com/errors/CJWCu8b5_ureAg
* https://console.cloud.google.com/errors/CN6W4Zy7irzgOA
* https://console.cloud.google.com/errors/CN278MyjhZbtOQ
2020-01-31 14:40:11 -08:00
Ryan Barrett ee7b324525
bring back HOST_URL override to fed.brid.gy, for URLs emitted into AP 2019-12-26 18:18:44 -08:00
Ryan Barrett 02d36b3b1f
migrate to the app engine standard python 3 runtime!
https://cloud.google.com/appengine/docs/standard/python3/python-differences
https://cloud.google.com/appengine/docs/standard/python/migrate-to-python3/
2019-12-25 22:26:26 -08:00
Ryan Barrett ab55c9d62c
ujson.dumps/loads() => util.json_dumps/loads() 2019-12-24 23:26:58 -08:00
Ryan Barrett 99a5c35ae3
switch from webutil.util.memcache_response to cache_response 2019-11-12 21:28:44 -08:00
Ryan Barrett faf676e8bb
switch from json to ultrajson for performance
https://github.com/esnme/ultrajson/
2019-10-29 07:06:15 -07:00
Ryan Barrett 7c9a03c827
unify HTTP fetching, HTML and mf2 parsing, and error handling into webutil
see:
* snarfed/granary#171
* snarfed/webutil@f994884b2b
* snarfed/oauth-dropins@f5b6e73530
* snarfed/granary@284eb11508
2019-10-03 21:08:26 -07:00
Ryan Barrett c623a295c6
misc noop cleanups based on LGTM alerts
https://lgtm.com/projects/g/snarfed/bridgy/?mode=list
2019-09-19 11:57:16 -07:00
Ryan Barrett 9ff0a28dd3
minor bug fix in AP Undo Follow error handling 2019-08-14 11:16:37 -07:00
Ryan Barrett 65044b081c
accept Undo of Follow even if Follower doesn't exist 2019-08-01 10:39:15 -07:00
Ryan Barrett 4b70a89046
handle AP Undo of Follow
needed for eg mastodon when you unfollow and then try to refollow someone. on unfollow, mastodon sends an Undo, and waits for a 200 before it shows success and will let you refollow.
2019-08-01 10:32:50 -07:00
Ryan Barrett c055f3aeba
drop HTML tags from webfinger error messages
fixes #53
2019-06-24 14:46:45 -07:00
Ryan Barrett 76686af538
cache lots of GET requests
this helps with requests that make external HTTP fetches, eg indieweb home pages/posts and federated profiles/posts, which change rarely.

in particular, outbound AP requests that get federated widely (eg Mastodon) result in all of those federated instances making the same bridgy fed requests at the same time, often within just a few seconds. more background: tootsuite/mastodon#4486
2019-04-16 11:05:18 -07:00
Ryan Barrett aa45f0c526
convert AP mentions to home page webmentions
for #46
2019-04-16 10:46:40 -07:00
Ryan Barrett 2e33354c27
add following and followers fields to AS2 actors
for #40. they currently both point to endpoint URLs that don't actually work yet, just like the recently added outbox field.
2019-01-14 11:08:08 -08:00
Ryan Barrett b237e52d6a
add outbox, summary, and publicKey.id properties to actors
for #39, for pixelfed
2019-01-04 08:05:07 -08:00
Ryan Barrett a88165c4e3 webmention => AP: big refactoring to support Create
#33. still in progress!
2018-11-16 07:09:55 -08:00
Ryan Barrett 1c728f6590 AP => webmention: fetch actor for all activity types, including replies
fixes #41
2018-11-15 13:03:32 -08:00
Ryan Barrett 1c41aa4fd0
AP: blindly accept all Accepts
#21
2018-10-24 21:44:21 -07:00
Ryan Barrett 42ad9d1998
include full AS2 actor object in Response activities
for #21
2018-10-23 13:09:49 -07:00
Ryan Barrett 98a19a994d
convert AP Follow to indieweb webmention with u-follow-of
#21, https://indieweb.org/follow
2018-10-23 11:11:50 -07:00
Ryan Barrett abc5ecd919
AP Follow: store users' followers in the datastore
#21
2018-10-21 17:37:33 -07:00
Ryan Barrett a4b309afef
activitypub: refactor Accept response to Follow activity
...and get tests working. #21
2018-10-21 15:28:42 -07:00
Ryan Barrett ed3a685831
accept AP follow requests: original patch from @swentel
...from https://github.com/snarfed/bridgy-fed/issues/21#issuecomment-430403595
2018-10-19 06:50:00 -07:00
Ryan Barrett 9fc47c8ba9
AP => wm: switch to proxying reply wm source, unwrap URLs
for #35

example: https://webmention.io/realize.be/webmention/hG654HOgobymY54pMaNS
2018-10-17 17:49:56 -07:00
Ryan Barrett 2ffd10306f
AP => webmention: handle full AS2 activities
mastodon used to send bare objects for lots of things, e.g. replies, but now sends ful AS2 Create activities with embedded objects much more often. handle those too.

thanks for the nudge @swentel!
2018-10-15 11:52:11 -07:00
Ryan Barrett 5047337738
upgrade BS4 to 4.6.3, pin lxml to app engine prod's version 2018-10-11 17:03:26 -07:00
Ryan Barrett a1a66c2f24 fix logging for failed outbound HTTP requests
also disable logging full parsed mf2 in activitypub actor handler.
2017-10-24 18:27:07 -07:00
Ryan Barrett c81a6b8ed2 activitypub: follow HTML link rels that point to AS2 objects
...by reusing common.get_as2(). also lots of misc refactoring.
2017-10-20 12:49:48 -07:00
Ryan Barrett e985516dc3 return parsed JSON from common.get_as2(); use it in activitypub 2017-10-20 07:13:04 -07:00
Ryan Barrett bb9294ea51 tell common.error() explicitly when to include exc_info 2017-10-17 11:47:01 -07:00
Ryan Barrett bf0897ba81 activitypub and salmon: return 501 on unsupported activity type 2017-10-16 22:21:13 -07:00
Ryan Barrett 73ac7ba1e7 unify webmention sending from salmon and activitypub into common 2017-10-16 09:13:55 -07:00