Wykres commitów

68 Commity (df6b0b58ba11ed92be1c798aeff37ba090cda1b8)

Autor SHA1 Wiadomość Data
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 879f6d1752
return 400 on more bad inputs, eg webmention source URLs 2019-08-13 13:29:31 -07:00
Ryan Barrett dd0a0d964b
don't assert on posts without u-id or u-url
fixes https://console.cloud.google.com/errors/CNLV_6K-gtPJDw
2019-07-24 13:03:15 -07:00
Ryan Barrett 7c8a2a4603
fix postprocess_as2() crash on multiply-valued inReplyTo
fixes https://console.cloud.google.com/errors/COTu_PXPjJ2ZWw
2019-06-06 06:35:57 -07:00
Ryan Barrett 088e9cfaf7
skip outbound webmentions to same domain as source 2019-04-16 11:42:17 -07:00
Ryan Barrett aa45f0c526
convert AP mentions to home page webmentions
for #46
2019-04-16 10:46:40 -07:00
Ryan Barrett 5bc639216e
more error handling for AS2 objects without id or URL
follows b7e44c9295. fixes https://console.cloud.google.com/errors/CLnu14G46vHLOg
2019-04-15 08:14:37 -07:00
Ryan Barrett b7e44c9295
don't choke on AS2 objects without id or URL
fixes https://console.cloud.google.com/errors/CO6w076w6oX32wE
2019-04-12 20:47:28 -07:00
Ryan Barrett 6e7c2008e9
handle SSL failures when fetching arbitrary URLs
fixes https://console.cloud.google.com/errors/CJOuzd2b1sehPA
2019-04-10 08:08:02 -07: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 b7f89dce99
webmention => AP: handle actor/attributedTo id as well as url
for #40
2018-12-11 10:59:41 -08:00
Ryan Barrett a9324adceb
webmention => AP: put images into AS2 'attachment' field for Mastodon
for https://github.com/snarfed/bridgy-fed/issues/33#issuecomment-440965618
2018-11-23 22:17:37 -08:00
Ryan Barrett ec3da6a485
webmention => AP: fix Salmon after big Create refactoring
for #33
2018-11-20 08:24:26 -08:00
Ryan Barrett 2bb418dc72
webmention => AP support for u-follow-of => Follow 2018-10-24 21:28:52 -07:00
Ryan Barrett 0f11cd1ff1
normalize user domains to URLs (with scheme) by following redirects
#21, for getting translated webmentions to have u-follow-of with full URL values, not just domains.
2018-10-23 12:39:16 -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 e090c2ba0a
AP Follow bug fix: actors are fed.brid.gy/DOMAIN, not /r/ redirect URLs 2018-10-21 18:54:27 -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 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 27e56396b8
AP => wm: remove our redirect from target URLs
fixes the second half of #35
2018-10-17 12:00:38 -07:00
Ryan Barrett 9fb7f2fe26
AP => wm: prefer object URL for webmention source if available
fixes half of #35
2018-10-17 11:52:34 -07:00
Ryan Barrett 25d2724700 add Mention tag for Mastodon replies
fixes #34. thanks @swentel!
2018-10-16 11:38:12 -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 b25960ca93
wrap activity ids and urls and actor ids in our /r/ endpoint
for #16, #32. cc @swentel.
2018-10-14 07:58:17 -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 be2ea6ad28 webmention: if u-url is missing, default to source url
AS2 id, which is required for ActivityPub, comes from u-url, so we always need one.

fixes #20
2017-12-12 18:07:12 -08:00
Ryan Barrett da4873fc64 activitypub: cc all original recipients (in to and cc) 2017-11-05 15:50:23 -08:00
Ryan Barrett 29fb93ca92 change username from 'me' to web site domain
for #3, tootsuite/mastodon#5523
2017-10-26 17:07:57 -07:00
Ryan Barrett cf1f4122ec log more json response bodies 2017-10-24 18:31:13 -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 786173d270 activitypub: point actor ids to bridgy fed, not source web site
...since we want to serve them as AS2.

for tootsuite/mastodon#5500
2017-10-23 21:57:08 -07:00
Ryan Barrett e538f97456 activitypub: prefer id over url for inReplyTo and Like/Announce object
as per tootsuite/mastodon#5500
2017-10-23 21:23:33 -07:00
Ryan Barrett 7dcbd9f107 minor fixes to a couple log msges 2017-10-23 21:02:07 -07:00
Ryan Barrett f2a422fa0b when we can't fetch AS2, demote log level to INFO 2017-10-22 15:59:51 -07:00
Ryan Barrett 530969da1b use non-unicode strings for Content-Type values
...because App Engine's wsgi.py requires header values to be str, not unicode.

also improve logic for whether to log HTTP response bodies.
2017-10-20 18:05:51 -07:00
Ryan Barrett b7007a4521 fetching AS2: handle Content-Type with charset suffix 2017-10-20 17:35:11 -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 527ca5585b add common.get_as2() 2017-10-20 07:01:38 -07:00
Ryan Barrett 7ca72a1b36 fix error handling in common.requests_*()
it can't use common.error() because it doesn't have a handler object.
2017-10-18 22:47:03 -07:00
Ryan Barrett bb9294ea51 tell common.error() explicitly when to include exc_info 2017-10-17 11:47:01 -07:00
Ryan Barrett a520fe8462 pass 4xx and 5xx responses from fedsocnets through to client
cc @mblaney
2017-10-16 22:27:54 -07:00
Ryan Barrett db75bd7589 webmention => activitypub: fix likes and reposts
thanks to @mblaney for finding!
2017-10-16 21:48:41 -07:00