Ryan Barrett
0902994af0
webfinger: infer protocol from brid.gy subdomain in request or resource
...
first commit for inferring protocol. exciting! for #512
2023-06-12 15:50:00 -07:00
Ryan Barrett
239976ca43
drop old /acct: URL route for serving Webfinger
...
honestly no clue where this came from, haven't found it in the spec, couldn't figure out when/why I originally added it in git history. 🤷
2023-06-12 13:32:21 -07:00
Ryan Barrett
6796b47a9f
noop: move web.NoMicroformats to common, misc other minor cleanup
2023-06-10 07:53:07 -07:00
Ryan Barrett
7f6cc61683
improve domain validation for Web key ids, normalize to lower case
2023-06-09 10:58:28 -07:00
Ryan Barrett
2941d79b64
move follow.fetch_webfinger to webfinger.py
2023-06-06 11:29:36 -07:00
Ryan Barrett
fe27742b80
AP users: promote ActivityPub.label_id computed prop to User.readable_id
...
and drop ActivityPub.get_by_id() override, move logic to user() page handler. fixes 'Only ancestor queries are allowed inside transactions.'
for #512
2023-06-03 21:48:15 -07:00
Ryan Barrett
daba73ce38
update a few user page links in the web UI, /user/ => /web/
...
for #512
2023-06-03 08:03:38 -07:00
Ryan Barrett
958f81ddd1
AP users: rename [is_]homepage => [is_]web_url, move into Protocol subclasses
...
for #512
2023-05-31 18:47:40 -07:00
Ryan Barrett
35060c172a
switch actor_id() and address90 back to User methods, to be implemented by subclasses
...
partially reverts 9e906f18e4
2023-05-31 10:10:14 -07:00
Ryan Barrett
9e906f18e4
move address, actor_id from User to activitypub.py, /web-site to web.py
...
for #512
2023-05-30 17:24:49 -07:00
Ryan Barrett
29f1a1d4ac
AP users: start parameterizing URLs, including UI pages and AP endpoints
...
user pages now have /[protocol]/ prefix, AP endpoints have /ap/ prefix. for #512
2023-05-30 16:38:58 -07:00
Ryan Barrett
93f621aaf5
AP users: start to replace external with indirect, starting with webfinger
...
#512
2023-05-29 20:16:15 -07:00
Ryan Barrett
c8b2103e13
rename Webmention class => Web, webmention.py => web.py
2023-05-26 17:40:29 -07:00
Ryan Barrett
eaa4e5333a
start to make User subclasses for each protocol
...
#512
2023-05-26 16:07:36 -07:00
Ryan Barrett
6333b7126a
AP users: serve webfinger for external users
...
#512
2023-05-23 11:53:32 -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
5e3c623552
add User.actor_id()
2023-03-19 09:34:42 -07:00
Ryan Barrett
e31be9b955
webfinger: minor noop simplification
2023-02-16 20:29:41 -08:00
Ryan Barrett
f39c532ad3
add User.homepage, is_homepage()
2023-02-12 12:03:27 -08:00
Ryan Barrett
cb6fe8c264
webfinger: minor noop cleanup
2023-02-11 18:59:19 -08:00
Ryan Barrett
5d455b7d18
switch webfinger to serve entirely out of Users in datastore
...
no more fetching and converting users' home pages on demand!
for #392 , helps #378
2023-02-09 20:00:58 -08:00
Ryan Barrett
d523cc085a
remove OStatus parts of Webfinger
...
background on Mastodon interop:
* https://docs.joinmastodon.org/spec/webfinger/
* https://github.com/mastodon/mastodon/pull/11280
* https://docs.joinmastodon.org/spec/activitypub/#publicKey
2023-01-25 20:59:40 -08:00
Ryan Barrett
f0a5f1745e
webfinger: return data even if site has no representative h-card
...
fixes #384
2023-01-25 20:41:29 -08:00
Ryan Barrett
38c7c1bc5f
webfinger: return 404 if User not found
...
for #384
2023-01-25 20:00:54 -08:00
Ryan Barrett
55d5206188
cache 502s and 504s for requests that fetch users' sites
...
for #378
2023-01-24 16:29:19 -08:00
Ryan Barrett
c50f0e0106
add follow UI to user/[domain]/following
...
for #351
2023-01-07 09:34:55 -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
fe5c3947a8
drop OStatus! it's been unused for years
...
fixes #282
2023-01-04 19:22:11 -08:00
Ryan Barrett
4c383a3037
request caching tweaks, webfinger, use new flask_util.cached headers kwarg
2022-12-26 13:34:50 -08:00
Ryan Barrett
47aec1c5ea
use util.is_web() more
2022-12-10 09:09:44 -08:00
Ryan Barrett
bd4d30f61c
add remote follow link rel to webfinger
...
https://socialhub.activitypub.rocks/t/what-is-the-current-spec-for-remote-follow/2020/11?u=snarfed
https://github.com/snarfed/bridgy-fed/issues/60#issuecomment-1325589750
and #60
2022-12-01 10:09:57 -08:00
Ryan Barrett
795cb34ac1
webfinger: handle bad acct: URI
...
https://console.cloud.google.com/errors/detail/CKGv-b6impW3Jg;time=P30D?project=bridgy-federated
2022-11-28 17:27:58 -08:00
Ryan Barrett
7d902ec616
bug fix for custom username in fediverse address on user page UI
...
should come from acct: actor URL, not preferredUsername field, which always has to be user's domain for AP interop.
in the process, refactored common.get_username() into User.username().
for #281
2022-11-26 16:05:02 -08:00
Ryan Barrett
18a80d09fb
webfinger error handling: return 400 on ?resource=acct:@fed.brid.gy
...
fixes https://console.cloud.google.com/errors/detail/CPn404XJ2rC6rAE;time=P30D?project=bridgy-federated
2022-11-26 06:59:27 -08:00
Ryan Barrett
8c258816d1
webfinger error handling: return 400 on ?resource= https://fed.brid.gy/
...
fixes https://console.cloud.google.com/errors/detail/CPn404XJ2rC6rAE;time=P30D?project=bridgy-federated
2022-11-25 08:00:14 -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
65f3ef3cc7
show fediverse address on user page UI, including custom username
...
for #281
2022-11-20 11:46:05 -08:00
Ryan Barrett
f127a17fe5
webfinger: handle Bridgy Fed actor URLs
...
hoping to fix errors like this on Mastodon AP delivery:
`Received 401: Public key not found for key https://fed.brid.gy/snarfed.org `
2022-11-17 14:56:05 -08:00
Ryan Barrett
2d9cc31ff9
switch default home page scheme from http to https
...
fixes #269
2022-11-16 10:43:34 -08:00
Ryan Barrett
320b117470
add AP sharedInbox
...
#285 , https://www.w3.org/TR/activitypub/#sharedInbox
2022-11-16 10:09:24 -08:00
Ryan Barrett
50956c02b0
noop, rename Domain => User
2022-11-15 22:00:28 -08:00
Ryan Barrett
e3f1431018
noop identifier renames, key => domain or entity
2022-11-15 19:12:20 -08:00
Ryan Barrett
4f3dc03a3e
rename MagicKey => Domain, Response => Activity
...
the Python classes, but not (yet) the kinds in the datastore. maybe eventually.
2022-11-12 15:27:59 -08:00
Ryan Barrett
e767cf5d1f
refactor /responses and user pages, add follower counts to user pages
...
for #274
more to come
2022-11-11 21:13:51 -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
2f28be09be
convert %-formatted strings with args in logging.* calls to f-strings
2021-12-27 22:45:57 -08: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