Ryan Barrett
229c77364a
common.create_task: handle Authorization header when not in request context
2025-06-17 15:21:33 -07:00
Ryan Barrett
cff0a546dd
web: allow incoming webmention on our own domains with the secret key
...
for #1511
2025-06-09 16:26:40 -07:00
Ryan Barrett
6eaaf699c8
don't populate test protocols into PROTOCOL_DOMAINS and AUTO_REPOST_ACCOUNTS in prod
2025-06-06 13:12:21 -07:00
Ryan Barrett
046e91a9c5
start on Nostr!
...
for #446
2025-05-30 13:00:50 -07:00
Ryan Barrett
b98e577656
noop: move ErrorButDoNotRetryTask from protocol to common
2025-05-21 10:54:17 -07:00
Ryan Barrett
de1bd693dd
OAuth logins: catch and flash errors
...
for #1680
2025-05-21 10:53:52 -07:00
Ryan Barrett
dae5db6eb0
add common.BETA_USER_IDS
2025-05-20 20:43:34 -07:00
Ryan Barrett
e99e5316ac
stop caching users and other sensitive kinds locally in memory
...
only use memcache
2025-05-16 16:30:58 -07:00
Ryan Barrett
700f5d6c26
don't serve subscribeRepos on default (fed.brid.gy)
...
only on atproto-hub (atproto.brid.gy)
cc @bnewbold
2025-04-29 17:33:35 -07:00
Ryan Barrett
4611551140
add common.CACHE_CONTROL_VARY_ACCEPT
2025-01-29 11:57:50 -08:00
Ryan Barrett
96819770df
ndb caching: drop users and profile objects back down to 2h
2025-01-28 20:26:06 -08:00
Ryan Barrett
c930927ff9
noop: add constant for ndb memcache timeout
2025-01-25 09:37:42 -08:00
Ryan Barrett
ce7ea9b6e8
standardize request param logging into common.log_request()
...
truncates values at 1k chars each
2025-01-22 21:35:19 -08:00
Ryan Barrett
4624529eb9
move rumble.com from web blocklist to common blocklist so that it applies to AP too
2025-01-19 10:02:01 -08:00
Ryan Barrett
2fe997d8b8
common.create_task: omit params with value None
2025-01-17 15:27:22 -08:00
Ryan Barrett
58a841e5ac
drop 2w account age req't to 1w
...
cc @anujahooja
2025-01-15 11:52:01 -08:00
Ryan Barrett
32a60c980c
updates for ndb context caching everything: Object.new/changed logic, tests
...
for #1149 , 18aa302da
2025-01-13 16:19:32 -08:00
Ryan Barrett
18aa302dac
temporarily enable ndb context cache for everything
...
for #1149
2025-01-12 08:11:29 -08:00
Ryan Barrett
2437a16b1e
add youtube to domain blocklist
2025-01-12 07:57:18 -08:00
Ryan Barrett
bf3f27dc54
bump up ndb cache timeouts: users and profiles indefinitely, everything else 2h
...
for #1149
2025-01-10 18:13:17 -08:00
Ryan Barrett
e8b201dc33
extract memcache logic out into new memcache.py file
2025-01-09 17:10:05 -08:00
Ryan Barrett
56aca5bdba
common.create_task: don't crash if we're outside a request context
...
oops 😀
fixes https://console.cloud.google.com/errors/detail/CI37sYuA9Z6Q4gE;time=PT1H;locations=global?project=bridgy-federated&inv=1&invt=AbkfaA
2024-12-18 16:16:09 -08:00
Ryan Barrett
91b268fa4f
unify ndb_client.context() kwargs into common.NDB_CONTEXT_KWARGS
2024-12-18 15:44:35 -08:00
Ryan Barrett
4f5e868b05
common.memcache_memoize: add key callable kwarg
2024-12-13 15:25:03 -08:00
Ryan Barrett
baf4bfcebe
Web.verify: for www domains, handle when root domain user is blocked
...
fixes https://console.cloud.google.com/errors/detail/CPWdpJyQ4I-GVg;locations=global;time=P30D?project=bridgy-federated
2024-12-11 21:29:48 -08:00
Ryan Barrett
5d6d68b5e7
cache models.get_original_user/object_key queries in memcache
...
adds new generic common.memcache_memoize decorator for caching any function's output in memcache. for #1149
2024-12-11 20:17:36 -08:00
Ryan Barrett
3c3dadb524
minor log tweaks, TODO
2024-12-04 14:38:35 -08:00
Ryan Barrett
2831ce1848
common.create_task: bug fix for 65feae0f9b
2024-12-03 12:09:09 -08:00
Ryan Barrett
65feae0f9b
more logging tweaks for tasks
...
only log task creations and runs if traceparent header isn't set
for #1149
2024-12-03 11:03:36 -08:00
Ryan Barrett
ccdb77d743
common.create_task: connect trace by adding traceparent header
...
https://cloud.google.com/trace/docs/trace-context#http-requests
https://stackoverflow.com/a/71343735/186123
2024-12-02 18:22:36 -08:00
Ryan Barrett
4f03987f12
stop logging params when creating a new task
...
for #1149
2024-12-02 18:20:34 -08:00
Ryan Barrett
23e0323e60
tweak common.DOMAIN_RE to avoid exponential backtracking
...
hopefully fixes https://github.com/snarfed/bridgy-fed/security/code-scanning/53 , https://github.com/snarfed/bridgy-fed/security/code-scanning/48
2024-12-02 11:54:38 -08:00
Ryan Barrett
d9807658d0
common.create_task: prune down logging a bit
2024-11-22 09:23:20 -08:00
Ryan Barrett
b77715fc3c
create_task: stop logging JSON parameter values
...
for #1149
2024-11-21 15:55:09 -08:00
Ryan Barrett
bc4d139ba3
common.as2_request_type: log Accept if it's not AS2
...
for #1493
2024-11-16 14:42:02 -08:00
Ryan Barrett
9725099006
docs: make email address less prominent
...
getting too many email requests for support with questions that are already covered in the docs. 😕
2024-11-16 09:39:11 -08:00
Ryan Barrett
741ce52290
common.create_task: stop logging dict params
...
even truncated like they were. for #1149
2024-11-11 16:33:43 -08:00
Ryan Barrett
3ffe589e96
AP: put Accept activity id on same BF domain as actor
...
for #1093
2024-11-01 21:29:51 -07:00
Ryan Barrett
fa04b2ea44
AP actor endpoint: check conneg, redirect to profile if not an AS2 request
...
hopefully fixes #1009
2024-10-31 18:09:30 -07:00
Ryan Barrett
54cf1bf5bf
incoming DMs: don't strip links that aren't @-mentions of the bot; handle empty text
...
fixes https://console.cloud.google.com/errors/detail/CJia3JTRqujKcA;locations=global;time=P30D?project=bridgy-federated
2024-10-31 16:57:16 -07:00
Ryan Barrett
b4ac98c84e
move common.add, remove to webutil.util
...
in snarfed/webutil@46ef97e4fe
2024-10-31 09:41:28 -07:00
Ryan Barrett
5b75fa43d5
noop: tests: rename ExplicitEnableFake => ExplicitFake, eefake => efake
2024-10-08 15:03:43 -07:00
Ryan Barrett
41662e0b23
common.create_task: limit logged task body to 1000 chars
2024-10-02 12:18:32 -07:00
Ryan Barrett
788b37279a
pass Object data in receive task HTTP payload instead of through datastore
...
trying to cut down datastore load and costs. this switches receive tasks from storing and fetching Objects from the datastore to passing their properties - notably as2, our_as1, bsky, etc - in the HTTP request body, as serialized JSON inside form-encoded params.
for #1354 , #1149
2024-10-01 21:44:12 -07:00
Ryan Barrett
64b3b09365
common.unwrap bug fix, handle integer ids
...
fixes https://console.cloud.google.com/errors/detail/CMyCsrj2u_-gHw;locations=global;time=P30D?project=bridgy-federated
2024-09-26 21:11:15 -07:00
Ryan Barrett
a64316df74
Web.poll_feed_task: add last_polled param to detect and suppress dupes
...
re 0f805e0885
, 6cdbefa6de
2024-09-21 08:22:21 -07:00
Ryan Barrett
6cdbefa6de
Web.poll_feed_task: don't return 304 because it incurs retries
...
0f805e0885
made us both return 304 and create a new task on errors, which led to a task explosion because we'd retry and create more tasks. oops.
2024-09-21 07:48:08 -07:00
Ryan Barrett
794a772619
switch ATProto chat polling from task to cron job
2024-09-10 16:46:37 -07:00
Ryan Barrett
36ac136ebf
common.report_error: log message and exception
2024-08-30 13:09:15 -07:00
Ryan Barrett
6ebe119e6e
common.report_error bug fix, error_reporting.Client.report_exception doesn't take msg
2024-08-29 21:03:22 -07:00