Wykres commitów

140 Commity (b5a0386cd007e37b59e9fa2dad131cbbea46dd1f)

Autor SHA1 Wiadomość Data
Ryan Barrett fcb7c366ba
webmention: ostatus: don't try to serialize entire feedparser output
...since it includes an exception (eg `SAXParserException`) in the `bozo_exception` field if the bozo bit is set. https://feedparser.readthedocs.io/en/latest/bozo.html

fixes https://console.cloud.google.com/errors/CKThy6imn5_A2wE
2021-12-26 09:58:07 -08:00
Ryan Barrett 5ddf90fd93
fix log message f-string 2021-11-01 16:14:36 -07:00
Ryan Barrett d23792d8b3
webmention: skip sending AP Update if content hasn't changed
fixes #78
2021-10-10 13:47:33 -07:00
Ryan Barrett cdb9a519e6
common.get_as2 bug fix: don't clobber werkzeug's HTTPException.response
store requests.Response in separate requests_response attr
2021-08-18 08:53:00 -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 b23705e97e
don't store a Response for OStatus/Salmon unless we actually attempt delivery 2021-07-20 15:55:16 -07:00
Ryan Barrett 2e3360a54b
move Flask utils to oauth_dropins.webutil.flask_util
corresponds to snarfed/webutil@5574bb23fa
2021-07-17 21:22:13 -07:00
Ryan Barrett 4fffc073d2
flask: port webmention, add exception handler 2021-07-11 08:48:28 -07:00
Ryan Barrett f26aed5cbb
flask: port salmon 2021-07-08 22:50:33 -07:00
Ryan Barrett 064acef4b0
verify SSL certs (more)
requires snarfed/webmention-tools@0059627cfd
2021-04-03 21:15:28 -07:00
Ryan Barrett cb24aae3bd
salmon webfinger discovery: handle bad JSON 2021-03-29 22:54:33 -07:00
Ryan Barrett 33436a35a1
webmention: de-dupe inboxes before delivering 2021-02-24 13:41:46 -08:00
Ryan Barrett eef94eb033
if ActivityPub inbox delivery fails, don't fall back to Salmon 2020-11-13 09:50:14 -08:00
Ryan Barrett 2c15820ef6
webmention => AP: handle multiple in-reply-to links
fixes #65. thanks again for reporting, @nekr0z!
2020-06-06 08:40:07 -07:00
Ryan Barrett 2a91f01393
webmention: handle missing Content-Type header
for https://console.cloud.google.com/errors/CNnflKqP5rHWvgE , https://console.cloud.google.com/errors/CPyMpaulkMKWZA
2020-05-20 23:36:11 -07: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 2082dd7a85
salmon webfinger discovery bug fix: don't assume author detail in Atom
fixes https://console.cloud.google.com/errors/CLr8toqQo9yNSw
2019-12-26 14:42:58 -08:00
Ryan Barrett 3cdd58dfbf
python 3: replace a few errant unicodes with strs 2019-12-26 07:57:33 -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 00d0cc5557
fully qualify relative Atom feed URLs before fetching
fixes #58. thanks again for reporting @fluffy-critter!
2019-09-23 11:20:11 -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 ef8b9b13cc
bug fix in webmention => activitypub target fetch error handling
fixes https://console.cloud.google.com/errors/CPyMpaulkMKWZA
2019-08-13 16:23:47 -07:00
Ryan Barrett f02c212f37
AP delivery: skip inactive followers 2019-08-01 10:36:39 -07:00
Ryan Barrett aa5fac01dd
webmention => AP: fix error handling for outbound AP requests 2018-12-11 11:00:54 -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 0af5c136bb
webmention => AP/Salmon: handle no targets or followers, return 200
fixes https://console.cloud.google.com/errors/CIrig_2B6_i87AE
2018-11-27 15:14:56 -08:00
Ryan Barrett e964190162
webmention => AP: check for link to bridgy fed in source page
fixes #42
2018-11-27 10:27:12 -08:00
Ryan Barrett a52765821f
stop emailing me on every inbound webmention 2018-11-23 21:28:02 -08:00
Ryan Barrett a89e0038de
webmention => AP: Create: another bug fix for string Follower actors
for #33. follow-up to 2cb0dda2d1.
2018-11-20 09:47:01 -08:00
Ryan Barrett 2cb0dda2d1
webmention => AP: Create: handle Follower with actor URL instead of object
we don't create these any more, we always fetch and store full actor objects, but we have a few old ones lying around in the prod datastore.

for #33
2018-11-20 08:37:57 -08:00
Ryan Barrett 11c66cfd3e
webmention => AP: fix AP replies etc after big Create refactoring
for #33
2018-11-20 08:24:29 -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 a88165c4e3 webmention => AP: big refactoring to support Create
#33. still in progress!
2018-11-16 07:09:55 -08:00
Ryan Barrett 197d8a561f
fix tests broken by a4b309afef
#21
2018-10-21 18:00:12 -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 eea19045ff
wm => AP: drop warning on 202 response, now that mastodon is fixed
for #16
2018-10-17 07:41:41 -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 6815807298 only email me on successful webmentions, not all 2018-04-02 09:36:09 -07:00
Ryan Barrett bf71c5fe2c webmention: handle source page with no mf2
fixes https://console.cloud.google.com/errors/CNixlrul4YPdMw
2018-03-27 14:04:48 -07:00
Ryan Barrett d0ecc4cc66 don't email me for my own posts 2018-02-02 10:01:00 -08:00
Ryan Barrett 1e111547e4 run full mf2 authorship algorithm when necessary
like for https://aaronparecki.com/2018/01/11/4/
2018-01-12 09:30:27 -08:00
Ryan Barrett d9eb56da55 add test for simple string-only author properties
like @aaronpk's in https://aaronparecki.com/2018/01/11/4/ . actual bug fix is snarfed/granary@a530afe08d
2018-01-11 10:52:44 -08:00
Ryan Barrett 78064865c0 don't email me on webmentions from localhost :P 2017-12-26 20:15:28 -08: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 dcc6b9d23b minor tweak to fix /log 2017-10-26 17:31:40 -07: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 92798bc434 webmention: refactor storing Responses so we can do it earlier 2017-10-26 12:31:04 -07:00
Ryan Barrett 07c650b9e1 add /log handler, link to it from /responses
reuses LogHandler newly moved from bridgy to webutil in snarfed/webutil@a49b3af4d1
2017-10-26 09:32:17 -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 defc9f3b2a webmention => activitypub: on 2xx, return the activitypub status code
useful for mastodon 1.6 202s which usually mean signature verification failed. :(
2017-10-21 16:42:37 -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 3922d54359 outbound salmon: fix like and repost support 2017-10-17 18:39:15 -07:00
Ryan Barrett db75bd7589 webmention => activitypub: fix likes and reposts
thanks to @mblaney for finding!
2017-10-16 21:48:41 -07:00
Ryan Barrett 52ee8f8c54 webmention: fix email subject 2017-10-16 17:33:38 -07:00
Ryan Barrett 02ff737dac email me (for now) whenever we get a wm 2017-10-15 17:34:21 -07:00
Ryan Barrett 6190f3bc0c refactor abort() calls to use common.error() 2017-10-15 16:57:33 -07:00
Ryan Barrett ef89af7372 switch to using Response.get_or_create()
also test an incoming activitypub like with an id with a fragment
2017-10-11 18:13:06 -07:00
Ryan Barrett 6a65e2e74a store source post in Response
...so we can use it to render proxy ActivityPub mf2 pages for webmentions
2017-10-09 21:11:40 -05:00
Ryan Barrett d1c54ff223 activitypub: send Update instead of Create for existing responses 2017-10-09 20:12:17 -05:00
Ryan Barrett 19a686edc3 store responses in new Response datastore model 2017-10-09 19:29:50 -05:00
Ryan Barrett c47e07ab94 webfinger: check domain home page too; preserve port in MagicKey domain 2017-10-04 09:12:08 -07:00
Ryan Barrett 63a9e47002 outbound webfinger: use full acct: URIs 2017-10-04 09:12:00 -07:00
Ryan Barrett f6a3ca1848 new incoming webmention UI: expect them to add fed.brid.gy link
...instead of wrapping URL in fed.brid.gy/wm/... to inject webmention Link endpoint.
2017-10-01 21:43:01 -07:00
Ryan Barrett 71f0a4c8d4 AP: add publicKey to actor object
needed for mastodon interop
2017-10-01 07:01:35 -07:00
Ryan Barrett c998901108 update webfinger, AS2, etc for receiving AP 2017-09-28 07:25:21 -07:00
Ryan Barrett b8bdde7cef fix tests for 3dd265d (AS2/AP tweaks for Mastodon) 2017-09-26 07:54:37 -07:00
Ryan Barrett 3dd265d741 more AS2/AP tweaks for Mastodon. likes and reposts aka boosts now work! 2017-09-26 07:36:46 -07:00
Ryan Barrett a27d89091b port activitypub AS2 conversion to granary 2017-09-24 17:03:03 -07:00
Ryan Barrett 601bfde5c7 even more AS2-isms for ActivityPub interop with Mastodon 2017-09-24 16:50:24 -07:00
Ryan Barrett 53cf61c980 more AS2-isms for ActivityPub interop with Mastodon 2017-09-20 18:05:33 -07:00
Ryan Barrett b123088158 activitypub: implement HTTP Signatures using httpsig library
thanks @ahknight!
2017-09-19 09:15:51 -07:00
Ryan Barrett 2320f1ce1e salmon: return 400 if target post has no Atom version 2017-09-14 06:52:18 -07:00
Ryan Barrett dbc009b3ce minor test fixes: MagicKey id is back to domain w/o username 2017-09-12 09:29:24 -07:00
Ryan Barrett 51b92c2d81 hubzilla interop: working locally! 2017-09-06 16:13:17 -07:00
Ryan Barrett 888868513c kroeg interop: handle actor/attributedTo w/inbox but no url 2017-09-04 21:16:40 -07:00
Ryan Barrett 0d4cc32d78 bug fix for attempting interop with quitter
atom author elements don't have email field
2017-09-03 16:01:52 -07:00
Ryan Barrett fb977c5f52 mastodon interop: webmention cleanup, tests 2017-09-03 15:26:41 -07:00
Ryan Barrett 76af3231e7 mastodon interop: got webmention => salmon slap to mastodon working!
TODO: lots of cleanup and tests
2017-09-03 12:20:37 -07:00
Ryan Barrett 00b2cd4a51 activitypub: singular inReplyTo, also cc in reply to url
trying to interoperate with https://distbin.com/ . still not there yet.
2017-08-26 16:04:31 -07:00
Ryan Barrett c9090401b0 misc tweaks after testing against distbin, mastodon, etc
- salmon: use top-level <entry>, not <feed>
- activitypub: actor and attributedTo are objects, not string URLs
- activitypub: cc public audience
- activitypub: use inbox in target post object if available
etc...
2017-08-26 15:20:54 -07:00
Ryan Barrett f6deddeb96 translate incoming webmentions to outgoing salmon slaps 2017-08-23 18:41:21 -07:00
Ryan Barrett 23180c7db0 add /wm/... URL proxy that injects our webmention endpoint 2017-08-15 12:02:02 -07:00
Ryan Barrett 04e65d612d add webmention endpoint and conversion to AP inbox delivery 2017-08-15 08:39:32 -07:00