Wykres commitów

1108 Commity (f21bc2cfe81fb04026e6b8eb632e5744f3d94b04)

Autor SHA1 Wiadomość Data
Ryan Barrett 4e489a4ee0
activitypub.inbox: store seen activity ids in memcache, short circuit on seen ids earlier 2024-06-13 13:54:37 -07:00
Ryan Barrett cb2a3bef0b
Object: drop legacy converting (un-escaping) between ^^ and # in ids/URLs
for #469, well over a year old, I think we're safe to forget about this now
2024-06-13 13:24:32 -07:00
Ryan Barrett fdca3b6d55
Protocol.receive: don't attempt to deliver to followers on non-enabled protocols
mostly just handles this more gracefully. these deliveries were failing anyway, just not cleanly. fixes eg https://console.cloud.google.com/errors/detail/CMHloZaRmPXQZQ;time=P30D?project=bridgy-federated , probably others too
2024-06-13 12:02:54 -07:00
Ryan Barrett 616073f788
merge hub and atproto_firehose services into a single service, atproto_hub
atproto_firehose is averaging 20-40% CPU right now, hub 5-10%, and both are 500-600M memory steady state, so they can easily fit together.
2024-06-13 12:02:54 -07:00
Ryan Barrett 387d3169a6
ATProto: rename original* custom fields to bridgyOriginal*
for #1092
2024-06-12 15:22:45 -07:00
Ryan Barrett 417a88a2a6
ATProto: support new off-lexicon originalDescription and originalUrl fields
for snarfed/bridgy-fed#1092
2024-06-12 15:22:45 -07:00
Ryan Barrett 04112c88bf
ATProto.add_source_links: switch to granary's Bluesky.truncate()
for #986
2024-06-10 16:15:59 -07:00
Ryan Barrett 551637f6a1
ATProto.send: ignore update/delete of object that we didn't bridge
fixes https://console.cloud.google.com/errors/detail/COX1ss-HvOq5Xg;time=P30D?project=bridgy-federated
2024-06-08 16:52:34 -07:00
Ryan Barrett 5b7f8de8d6
ATProto.send: handle delete when we have Object but not contents
fixes https://console.cloud.google.com/errors/detail/COjSuYPS0qLvmAE;time=P30D?project=bridgy-federated
2024-06-08 16:40:19 -07:00
Ryan Barrett 4a2abbac5b
ATProto.send, create_report: short circuit if repo is tombstoned
fixes https://console.cloud.google.com/errors/detail/CLTU-qezn5vJnQE;time=P30D?project=bridgy-federated
2024-06-08 15:16:39 -07:00
Ryan Barrett 796edf2033
Protocol.receive: drop direct targets if user isn't bridged into their protocol
fixes https://console.cloud.google.com/errors/detail/CMHloZaRmPXQZQ;time=P30D?project=bridgy-federated
2024-06-08 15:08:12 -07:00
Ryan Barrett 9ff28ea690
ATProto.send: short circuit out for deletes of objects we don't have
fixes https://console.cloud.google.com/errors/detail/COjSuYPS0qLvmAE;time=P30D?project=bridgy-federated , https://console.cloud.google.com/errors/detail/COX1ss-HvOq5Xg;time=P30D?project=bridgy-federated
2024-06-08 14:28:16 -07:00
Ryan Barrett 026d99edc0
pass ignore_links=True to html_to_text everywhere
for #976
2024-06-06 18:14:35 -07:00
Ryan Barrett 183c829229
ATProto.add_source_links: truncate before adding source links
for #976
2024-06-06 14:16:05 -07:00
Ryan Barrett 27fc843825
Protocol.add_source_links bug fixes, handle actors inside create/update activities
for #976
2024-06-06 11:40:25 -07:00
Ryan Barrett be30afd55a
ATProto: use plain text URLs domains in "bridged by Bridgy Fed" profile text
for #976
2024-06-06 08:58:09 -07:00
Ryan Barrett 9e18b7f110
tweak "bridged by Bridgy Fed" links in profile: use handle, add source protocol
for #976
2024-06-06 08:58:09 -07:00
Ryan Barrett ad81b1883e
refactor Protocol.convert, extract out new add_source_links method
for #976
2024-06-06 08:58:08 -07:00
Ryan Barrett 0046f6436e
ATProto: when creating repo, store chat declaration to disable DMs
for https://github.com/snarfed/bridgy-fed/issues/1101
2024-06-04 20:22:31 -07:00
Ryan Barrett 3ccce1bc89
start using memorystore memcached for ndb global cache 2024-06-04 15:40:32 -07:00
Ryan Barrett 3fe402e54c
drop Object cache in Protocol.load 2024-06-04 14:27:04 -07:00
Ryan Barrett 07517f1685
ndb global cache: limit to users and profile objects, not other objects/activities 2024-06-04 14:27:04 -07:00
Ryan Barrett 441849a22a
Revert "Revert "start using an ndb in memory global cache in the frontends and router""
This reverts commit 0cbcf81ecc.

trying again!
2024-06-04 14:27:02 -07:00
Ryan Barrett 3cb9a9366d
Web, ATProto: skip add activities, eg Bluesky list items
hopefully fixes https://console.cloud.google.com/errors/detail/CP7I5eaZj-_TxgE;time=P7D;refresh=true?project=bridgy-federated
2024-06-04 14:10:21 -07:00
Ryan Barrett 423b5511dd
ATProto: Web.send: skip polls (objectType question)
for https://console.cloud.google.com/errors/detail/CPvA_dLO4r_hIA;time=P30D;refresh=true?project=bridgy-federated
2024-06-04 12:31:38 -07:00
Ryan Barrett 5e2dacc21f
Protocol.send_task: if send returns False, return 204, not 304
send returns False when the object or target URL are undeliverable. retries shouldn't fix this, so we don't want to retry.
2024-06-04 12:30:50 -07:00
Ryan Barrett 918b2f04ee
Web.send: skip polls (objectType question)
for https://console.cloud.google.com/errors/detail/CPvA_dLO4r_hIA;time=P30D;refresh=true?project=bridgy-federated
2024-06-04 12:03:34 -07:00
Ryan Barrett bad49575fb
Web: always use fetched URL as id, not u-url
fixes #829, cc #566
2024-06-03 16:20:46 -07:00
Ryan Barrett cc564a2b19
turn on authorization checks! HTTP sig matches actor, actor is allowed to modify object
for #566
2024-06-03 14:12:08 -07:00
Ryan Barrett 24559c8f17
Protocol.receive: normalize ids before resolving
for #959, and possibly others
2024-06-02 08:41:52 -07:00
Ryan Barrett 5266974731
Protocol.for_id: make Web own bot actor AP ids, not bot protocol 2024-06-02 08:21:18 -07:00
Ryan Barrett 68ef81ccec
webfinger: 404 requests for web users with unknown username
ie username doesn't match domain or mf2 custom username

fixes #1025
2024-06-01 17:53:04 -07:00
Ryan Barrett 0cbcf81ecc
Revert "start using an ndb in memory global cache in the frontends and router"
This reverts commit 7e77d7a463.

This slows down receive task processing, tasks all start taking longer and longer, can't figure out why. some kind of lock starvation in the global cache?

will experiment with this more in the ndb-global-cache branch.
2024-06-01 07:04:38 -07:00
Ryan Barrett 64324db3da
Web.poll_feed_task: limit to 10 items per poll 2024-05-31 13:46:01 -07:00
Ryan Barrett 7e77d7a463
start using an ndb in memory global cache in the frontends and router
lol yolo 982f8a70df/google/cloud/ndb/global_cache.py (L200-L202)

> Not intended for production use. Uses a single process wide dictionary to
> keep an in memory cache. For use in testing and to have an easily grokkable
> reference implementation. Thread safety is potentially a little sketchy.
2024-05-31 13:08:25 -07:00
Ryan Barrett 93f302d5de
noop: tests: drop unused flask.g imports 2024-05-30 13:50:52 -07:00
Ryan Barrett 7e594e3227
authz: move NO_AUTH_DOMAINS (a.gup.pe) from Protocol.receive to activitypub.inbox
for #566
2024-05-30 13:34:14 -07:00
Ryan Barrett fda7a79437
authz: on delete of actor signed by actor, pass authed_as to Object.get_or_create
for #566
2024-05-30 11:39:07 -07:00
Ryan Barrett 9f33767f33
authz: move LD Sig check from Protocol.receive to activitypub.inbox
for #566
2024-05-29 21:17:38 -07:00
Ryan Barrett 3301da3031
noop: add Fake.web_url 2024-05-29 16:46:16 -07:00
Ryan Barrett d6728a2e1b
Object.get_or_create authz check: allow a user to modify their profile object
for #566
2024-05-29 16:39:09 -07:00
Ryan Barrett 8f5d8221a9
add ids.profile_id, use everywhere
for #566
2024-05-29 16:18:15 -07:00
Ryan Barrett bfbae4b280
authz: normalize user ids before comparing, in both receive and Object.get_or_create
for #566
2024-05-29 12:29:38 -07:00
Ryan Barrett dd464ec6d3
add ids.normalize_user_id
for #566
2024-05-29 12:08:18 -07:00
Ryan Barrett ea0f61f446
authz: when comparing domains, handle common subdomains like www
for #566
2024-05-28 20:36:18 -07:00
Ryan Barrett f2a64c8b5c
Object.get_or_create: rename actor => authed_as, add to all calls
for #566
2024-05-28 16:07:32 -07:00
Ryan Barrett 820f7fa4f4
authz: add protocol.NO_AUTH_DOMAINS for domains we can't authorize yet
...eg a.gup.pe. https://github.com/snarfed/bridgy-fed/issues/566#issuecomment-2130714037
2024-05-28 15:23:22 -07:00
Ryan Barrett 1de49de720
update-profile: pass user id to receive task authed_as, not handle
for #566
2024-05-28 14:54:31 -07:00
Ryan Barrett 22760f5017
ActivityPub.verify_signature: follow controller/owner if different from keyId
for https://github.com/snarfed/bridgy-fed/issues/566#issuecomment-2130728082

https://swicg.github.io/activitypub-http-signature/#how-to-obtain-a-signature-s-public-key
2024-05-28 13:48:03 -07:00
Ryan Barrett 3ec5e57136
activitypub.signed_request: limit redirects
for #1085, #1087
2024-05-27 21:02:59 -07:00