Ryan Barrett
|
f933c7e237
|
AP users: serve AS2 for external homepage URLs
#512
|
2023-05-22 23:17:42 -07:00 |
Ryan Barrett
|
d2ab48b23e
|
switch circular imports to runtime imports; split out flask_app.py from app.py
runtime imports are just as bad, but...meh. eventually I'll untangle them for real. #486
|
2023-04-18 17:18:17 -07:00 |
Ryan Barrett
|
fb5f7b3fb0
|
move current user into Flask g request-global
|
2023-03-20 14:28:14 -07:00 |
Ryan Barrett
|
d8932d4e76
|
add mf2 to user page dashboard to make a notifications feed
for #442
|
2023-03-14 11:27:10 -07:00 |
Ryan Barrett
|
106bbe623b
|
tests optimization: reuse same RSA key across Users
speeds up tests from ~22s to ~6s (!) on my laptop. for #398
|
2023-03-10 15:13:45 -08:00 |
Ryan Barrett
|
ffd8810b44
|
start to separate logic from protocols with new Protocol/ActivityPub classes
for #388
|
2023-03-10 07:36:50 -08:00 |
Ryan Barrett
|
85b8d86b17
|
common.get_as2: handle empty and non/bad JSON responses
fixes https://console.cloud.google.com/errors/detail/CKH_9oGur7T1ag;time=P30D?project=bridgy-federated
|
2023-02-28 16:21:33 -08:00 |
Ryan Barrett
|
fd27dabe61
|
switch JSON properties to custom JSONProperty that works in web console UI
https://github.com/googleapis/python-ndb/issues/874#issuecomment-1442753255
|
2023-02-24 07:25:29 -06:00 |
Ryan Barrett
|
91a60c7e67
|
switch Object.as1 to be a ComputedProperty
|
2023-02-23 21:17:26 -06:00 |
Ryan Barrett
|
1f3bd41dc5
|
common.redirect_unwrap: stop following redirects when unwrapping actor URLs
|
2023-02-23 08:35:06 -06:00 |
Ryan Barrett
|
48a7720f88
|
common.get_object: normalize ids by removing fragments
this is still underspecified and a bit inconsistent across fediverse implementations:
https://socialhub.activitypub.rocks/t/problems-posting-to-mastodon-inbox/801/11
> The reason might also be that your IDs aren’t permanent, as in, they contain a #fragment. Posts and their corresponding Create activities are supposed to be resolvable — which means one should be able to send a GET request to the ID URL and get the object back. This can’t be done with an URL that contains a fragment as the fragment is not a part of the HTTP exchange, it’s processed on the client.
https://socialhub.activitypub.rocks/t/problems-posting-to-mastodon-inbox/801/23
> I ran into this object id #fragment problem as well. It seems because of some URL normalization, Mastodon will remove the fragment, and drop any additional posts with different fragments (because they become the same url).
https://socialhub.activitypub.rocks/t/s2s-create-activity/1647/5
https://github.com/mastodon/mastodon/issues/13879 (open!)
https://github.com/w3c/activitypub/issues/224
nothing in the http sig spec, example key ids aren't even URLs there:
https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures-16
|
2023-02-15 20:00:12 -08:00 |
Ryan Barrett
|
47b83c4e51
|
common.get_object: update existing object if available
|
2023-02-14 15:26:25 -08:00 |
Ryan Barrett
|
f44aa3b39e
|
common.get_object: fall back to HTTP fetch if stored entity has no as2
also add more logging
|
2023-02-14 15:17:03 -08:00 |
Ryan Barrett
|
c2e6174330
|
add common.get_object()
|
2023-02-14 14:30:00 -08:00 |
Ryan Barrett
|
cb605e96c6
|
user page activities: if object is user, render as pretty user link
for #406
|
2023-02-06 21:28:40 -08:00 |
Ryan Barrett
|
f922ce89bb
|
user page: activities: render fediverse actor links as @-@
for #406
|
2023-02-06 21:08:52 -08:00 |
Ryan Barrett
|
4b37674624
|
always sign requests with current user's key, stop defaulting to snarfed.org
for #403
|
2023-02-06 19:23:25 -08:00 |
Ryan Barrett
|
717b068193
|
signed_post: don't follow redirects
fixes https://console.cloud.google.com/errors/detail/CLuyuajU2sqLtAE;time=P30D;refresh=true?project=bridgy-federated
|
2023-02-06 14:44:17 -08:00 |
Ryan Barrett
|
46736df21b
|
common.postprocess_as2 bug fix, handle multiply valued image field
|
2023-01-23 21:13:05 -08:00 |
Ryan Barrett
|
2c9850c576
|
HTTP Signatures: add special (request-target) header
for #40, special synthetic HTTP header for HTTP Signatures, required by Peertube.
https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12#section-2.3
|
2023-01-17 19:50:40 -08:00 |
Ryan Barrett
|
e6d4441292
|
handle redirects of signed requests manually, generate a new HTTP sig each time
fixes #326
|
2023-01-16 13:10:33 -08:00 |
Ryan Barrett
|
aa0dcbb222
|
noop: drop content type constants in common, use granary's instead
|
2023-01-06 21:01:33 -08:00 |
Ryan Barrett
|
7ac1006021
|
background task bug fix: override task runner host
we were using request.host_url blindly, which was fed.brid.gy for user-facing requests, but bridgy-federated.uc.r.appspot.com for tasks. #335
|
2023-01-05 15:05:35 -08:00 |
Ryan Barrett
|
d4741310e7
|
common.postprocess_as2 bug fix for multiply valued AS2 url field
fixes https://console.cloud.google.com/errors/detail/CMOZzPLojuud_QE;time=P30D?project=bridgy-federated
|
2022-12-11 07:28:30 -08:00 |
Ryan Barrett
|
8751fea257
|
harden URL unwrapping a bit, require http(s) URL or domain
fixes https://console.cloud.google.com/errors/detail/CMKn7tqbq-GIRA;time=P30D?project=bridgy-federated
|
2022-12-10 09:09:44 -08:00 |
Ryan Barrett
|
2fdc6f29a9
|
sign HTTP GET requests for AS2 objects
to support Mastodon's AUTHORIZED_FETCH aka secure mode: https://docs.joinmastodon.org/admin/config/#authorized_fetch
fixes #291
|
2022-11-24 09:41:14 -08:00 |
Ryan Barrett
|
8fd49dc882
|
drop non-public Create activities
fixes #289
|
2022-11-16 16:37:50 -08:00 |
Ryan Barrett
|
50956c02b0
|
noop, rename Domain => User
|
2022-11-15 22:00:28 -08:00 |
Ryan Barrett
|
46f039af63
|
AP: always generate an actor for every outbound activity
for #279
|
2022-11-15 21:43:24 -08:00 |
Ryan Barrett
|
7966650178
|
AP: put Public in to instead of cc to make Mastodon posts public, not unlisted
fixes #277
|
2022-11-13 21:46:26 -08:00 |
Ryan Barrett
|
96dba41c9b
|
logging: use separate loggers for each module with their names
|
2022-02-11 22:38:56 -08:00 |
Ryan Barrett
|
cf12817212
|
Flask port: error handling bug fixes, other misc tweaks
|
2021-08-16 11:47:31 -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
|
56cc66d530
|
flask: add common.RegexConverter
based on https://github.com/rhyselsmore/flask-reggie
|
2021-07-12 13:49:48 -07:00 |
Ryan Barrett
|
371a92a5db
|
flask: port XrdOrJrdHandler, finish porting webfinger
|
2021-07-11 16:30:14 -07:00 |
Ryan Barrett
|
c17cb3394b
|
flask: fix test_common, drop unused common.canonicalize_domain decorator
|
2021-07-10 08:53:37 -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
|
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
|
faf676e8bb
|
switch from json to ultrajson for performance
https://github.com/esnme/ultrajson/
|
2019-10-29 07:06: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
|
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
|
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
|
b8d52b3dac
|
move test/ => tests/ to avoid shadowing python's built in test module
fixes confusing problems with dev_appserver starting in cloud sdk 219 (app-engine-python 1.9.76). background in https://issuetracker.google.com/issues/117145272#comment25 .
|
2018-10-11 16:07:53 -07:00 |