Wykres commitów

32 Commity (main)

Autor SHA1 Wiadomość Data
Ryan Barrett b8e67829e3
ids.translate_handle: validate ATProto handles
https://atproto.com/specs/handle#handle-identifier-syntax

for https://github.com/snarfed/bridgy-fed/issues/982
2024-05-03 14:51:26 -07:00
Ryan Barrett 4b95d49ccc
ids.translate_handle: convert _ and ~ chars to - for Bluesky
hopefully fixes #982
2024-05-02 15:41:41 -07:00
Ryan Barrett c065c712f1
more id/handle translation tweaks for protocol bot users
hopefully fixes Accept actor for responding to bot user follows in AP
2024-04-25 14:29:48 -07:00
Ryan Barrett ce23a72549
make ids.translate_handle support protocol bot users 2024-04-23 15:01:40 -07:00
Ryan Barrett c87e69d354
bug fix for ids.web_ap_base_domain
...and test it properly instead of mocking out the constant
2024-04-22 15:15:27 -07:00
Ryan Barrett 34692abc60
handle protocol bot users in webfinger, ids.translate_handle, Web.owns_handle
for #880
2024-04-22 14:01:09 -07:00
Ryan Barrett ed78090d2c
expand User.ap_subdomain to allow protocol subdomains like bsky
part of setting up per-protocol bot users for #880
2024-04-22 11:12:03 -07:00
Ryan Barrett 0c37d94191
ids.translate_* noop refactoring: from_proto => from_, to_proto => to 2024-04-20 21:03:06 -07:00
Ryan Barrett 393605bde9
change ATProto.ABBREV to bsky
🤞, for #961
2024-04-17 06:54:16 -07:00
Ryan Barrett a45917cec8
ids.translate_object_id: normalize bsky.app profile URLs to DIDs 2024-04-09 10:04:16 -07:00
Ryan Barrett e3f2c2e0bc
ids.translate_user_id: normalize bsky.app profile URLs to DIDs 2024-04-09 09:48:16 -07:00
Ryan Barrett 6a63820cd8
tighten Object.owns_id to reject blocklisted domains
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-02-08 14:41:15 -08:00
Ryan Barrett 94b821bef5
test_ids: fix shadowed test method
woo, thanks for the catch flake8!
2023-12-24 10:26:12 -08:00
Ryan Barrett 199fb65dd6
ids.translate_object_id: handle Web.ap_subdomain
for https://github.com/snarfed/bridgy-fed/discussions/768
2023-12-24 10:20:04 -08:00
Ryan Barrett 2fafd83344
ids.translate_user_id: handle Web.ap_subdomain
for https://github.com/snarfed/bridgy-fed/discussions/768
2023-12-24 10:04:01 -08:00
Ryan Barrett c816be48ba
ids.translate_handle: add enhanced kwarg
for #551
2023-11-29 16:41:09 -08:00
Ryan Barrett bee313fb67
drop User.atproto_did, switch to using copies 2023-11-15 19:08:06 -08:00
Ryan Barrett 4d095fa3d9
misc cleanup
* remove obsolete TODOs, commented out code
* remove obsolete circular imports of per-protocol modules
* minimize Object put in Protocol.load
* remove duplicated Protocol.load tests in test_activitypub
* re-enable rest of ActivityPubUtilsTest.test_postprocess_as2_idempotent
* drop default cls=Web in TestCase.make_user
2023-11-15 14:23:08 -08:00
Ryan Barrett bca034c4f8
ids: use subdomain-wrapped URLs to convert ATProto to Web/AP 2023-11-06 20:17:23 -08:00
Ryan Barrett cada99e407
ids.translate_user_id: follow use_instead 2023-11-03 14:53:19 -07:00
Ryan Barrett 6410d0ef1a
ids.translate_object_id: special case Web => AP
also preserve local hosts
2023-11-03 11:37:36 -07:00
Ryan Barrett 37d8b5d4fc
ids.translate_user_id: for Web, normalize home page URLs to domains 2023-11-03 11:00:34 -07:00
Ryan Barrett 0725b72812
ids.translate_user_id: special case Web => AP to fed.brid.gy/domain 2023-11-03 06:53:33 -07:00
Ryan Barrett def5638a64
Protocol.translate: distinguish between object and user ids 2023-11-02 13:08:24 -07:00
Ryan Barrett 8e4e95914d
test_ids: remove unnecessary test for translate_object_id 2023-10-26 17:03:14 -07:00
Ryan Barrett c5959e00f4
add ids.translate_object_id 2023-10-26 16:20:30 -07:00
Ryan Barrett 5843235fd1
rename ids.convert_id => translate_user_id, convert_handle => translate_handle 2023-10-26 13:53:31 -07:00
Ryan Barrett 5a07e154ef
use subdomain_wrap in ids.convert 2023-10-24 15:58:03 -07:00
Ryan Barrett 39752dc7ca
ids: allow same from and to protocol in convert_id, convert_handle 2023-09-25 10:58:05 -07:00
Ryan Barrett 6c87254efb
tests: make Fake handles use fake:handle: prefix 2023-09-22 14:53:56 -07:00
Ryan Barrett 0d2ec18edd
add ids.convert_handle 2023-09-22 11:42:08 -07:00
Ryan Barrett e967bb4ada
start centralizing id conversion into new ids.py file 2023-09-22 11:42:08 -07:00