Commit Graph

150 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
50951d5db5 Merge branch 'master' into develop 2025-11-13 12:25:24 -05:00
Barış Soner Uşaklı
9900171f24 fix: crash in resolveInboxes
2025-11-13T12:38:44.161Z [4568/2508892] - error: uncaughtException: Invalid URL
TypeError: Invalid URL
    at new URL (node:internal/url:818:25)
    at /home/saas/nodebb/src/activitypub/index.js:123:25
    at Array.filter (<anonymous>)
    at ActivityPub.resolveInboxes (/home/saas/nodebb/src/activitypub/index.js:122:13)
    at ActivityPub.send (/home/saas/nodebb/src/activitypub/index.js:424:36)
    at Object.announce (/home/saas/nodebb/src/activitypub/feps.js:72:20)
2025-11-13 12:25:16 -05:00
Julian Lam
d02e188a5f feat: update Remove(Context) to use target instead of origin, federate out Move(Context) on topic move between local cids 2025-10-22 15:04:47 -04:00
Julian Lam
3ede64d8a1 refactor: move all methods in src/api/activitypub.js to src/activitypub.out.js 2025-10-22 14:41:56 -04:00
Julian Lam
a45f6f9c4c fix: update getPrivateKey to send application actor key when cid 0 2025-10-15 12:24:42 -04:00
Julian Lam
189fcfa694 Merge branch 'master' into develop 2025-10-01 12:52:17 -04:00
Julian Lam
4776d01281 sec: disallow checkHeader from returning a URL from a different origin than the passed-in URL 2025-10-01 11:00:03 -04:00
Julian Lam
7184507be2 fix: #13667, record to instances:lastSeen instead of domains:lastSeen 2025-09-25 15:12:52 -04:00
Julian Lam
be9212b59f fix: update activitypubFilterList logic so that it is also checked on resolveInbox and ActivityPub.get methods, updated instances.isAllowed to no longer return a promise 2025-09-19 10:56:35 -04:00
Julian Lam
5f4790a48c feat: allow activities to be addressed to as:Public or Public to be treated as public content 2025-09-15 14:01:00 -04:00
Julian Lam
86d9016f02 fix: regression that caused Piefed (or potentially others) content to be dropped on receipt 2025-09-04 10:29:17 -04:00
Julian Lam
4ef605b1aa fix: #13622, WordPress blog URLs not asserting properly 2025-08-29 13:33:19 -04:00
Barış Soner Uşaklı
b73ee309e0 refactor: remove invalid queued items
catch invalid json in payload
2025-08-28 12:39:44 -04:00
Julian Lam
28b63891d4 fix: minor fixes for yukimochi/Activity-Relay compatibility 2025-08-27 14:16:42 -04:00
Julian Lam
1e0fb20db4 feat: adding and removing relays from AP settings page in ACP 2025-08-27 14:16:42 -04:00
Barış Soner Uşaklı
027d6f307c fix: closes #13620 2025-08-27 00:06:32 -04:00
Julian Lam
bdcf28a3d9 feat: ability to add/remove auto-categorization rules for incoming federated content 2025-08-18 16:08:32 -04:00
Barış Soner Uşaklı
c6889f0864 fix: readd retry items 2025-08-03 06:43:31 -04:00
Barış Soner Uşaklı
a8bf4ea069 fix: ap queue id to use payload.type payload.id 2025-08-01 11:59:59 -04:00
Barış Uşaklı
b3a4a128cd refactor: move ap retry queue from lru cache to db (#13568)
* refactor: move ap retry queue from lru cache to db

get rid of the setTimeouts that were running for 2months
retries will survive server restarts

* refactor: reduce exp. backoff
2025-07-30 09:32:58 -04:00
Barış Soner Uşaklı
0997fbfa4d fix: clearTimeout if item is evicted from cache 2025-07-27 10:35:17 -04:00
Barış Soner Uşaklı
a08551a5e1 refactor: add names to caches, add max to request cache 2025-07-16 17:42:23 -04:00
Barış Uşaklı
14043ab0fd Node redis (#13500)
* refactor: start migrating to node-redis

* few more zset fixes

* fix: db.scan

* fix: list methods

* fix set methods

* fix: hash methods

* use hasOwn, remove cloning

* sorted set fixes

* fix: so data is converted to strings before saving

otherwise node-redis throws below error
TypeError: "arguments[2]" must be of type "string | Buffer", got number instead.

* chore: remove comments

* fix: zrank string param

* use new close

* chore: up dbsearch

* test: add log

* test: more log

* test: log failing test

* test: catch errors in formatApiResponse

add await so exception goes to catch

* tetst: add log

* fix: dont set null/undefined values

* test: more fixes
2025-06-18 13:04:57 -04:00
Julian Lam
a80edfa1f1 fix: patch ap .probe() so that it does not execute on requests for its own resources 2025-05-29 15:15:06 -04:00
Julian Lam
e70e990a1a feat: restrict access to ap.probe method to registered users, add rate limiting protection 2025-05-22 14:13:41 -04:00
Barış Soner Uşaklı
8174578c5b fix: closes #13405, catch errors in ap.verify 2025-05-11 22:31:00 -04:00
Julian Lam
0246c14643 fix: regression that caused resolveInboxes to always return empty, added tests for resolveInboxes 2025-04-29 10:28:17 -04:00
Julian Lam
309deb0d7a fix: filter out non-asserted targets when sending ap messages, diff. getter method when passed-in ID is a remote category 2025-04-29 10:28:17 -04:00
Julian Lam
1f40995f79 refactor: ability to browse to remote categories, group actor assertion logic, etc. -- no logic to assign topics to remote categories yet 2025-04-29 10:28:17 -04:00
Barış Soner Uşaklı
021b3af04a refactor: remove debug log 2025-04-07 13:23:46 -04:00
Barış Soner Uşaklı
3ad6ee075b Thumb uploads/post uploads normalization (#13300)
* testing thumn/post upload refactor

* fix: isOrphan check

* lint: fix md5

* test: fix upload test

* user

* fix: upgrade script

* refactor: long line

* lint: lint

* test: fix tests

* Squashed commit of the following:

commit cd70e6c610
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Fri Apr 4 09:24:54 2025 -0400

    fix: req.body can be undefined

* refactor: show data on test fail

* test: logs

* test: change test

* make sure timestamps are different
2025-04-04 10:45:05 -04:00
Julian Lam
aa4f23bfad fix: do not await the batch call to sendMessage 2025-03-28 12:59:06 -04:00
Julian Lam
dca3c35d76 fix: move AP send logging earlier 2025-03-02 22:58:05 -05:00
Julian Lam
7ceb6d69ae test: adjust test runner detection in AP code 2025-03-02 21:58:46 -05:00
Julian Lam
6e872b5fe4 test: log outgoing AP messages for local test runner 2025-02-28 13:56:40 -05:00
Julian Lam
95f2c4edb5 feat: support remote "Video" type objects in note assertion, #13120
- handle array attributedTo (plus per-object actor assertion instead of batched)
- explicit "Video" type handling to automatically save URL as post attachment
- handle array url property
2025-02-26 13:55:39 -05:00
Barış Soner Uşaklı
3991898171 Merge branch 'master' into develop 2025-02-19 20:09:40 -05:00
Barış Soner Uşaklı
a410587ce1 fix: closes #13180, don't execute cron jobs if ap disabled 2025-02-19 20:09:31 -05:00
Barış Soner Uşaklı
9997189aea feat: remove activities older than a week 2025-02-18 13:00:08 -05:00
Barış Soner Uşaklı
d9e86c7b07 feat: remove activities older than a week 2025-02-18 12:06:02 -05:00
Barış Soner Uşaklı
d590c2afcf perf: closes #13145, reduce calls in actors.prune
instead of deleting 18k users everyday delete max 500 every 30mins like notifications.prune

refactor getLocalFollowCounts so it works with an array of actors

dont make dbcalls for uids that dont exist
2025-02-11 11:01:32 -05:00
Barış Soner Uşaklı
676acb7e8c perf: closes #13145, reduce calls in actors.prune
instead of deleting 18k users everyday delete max 500 every 30mins like notifications.prune

refactor getLocalFollowCounts so it works with an array of actors

dont make dbcalls for uids that dont exist
2025-02-11 10:39:24 -05:00
Julian Lam
9fd6ac6bb8 refactor: move 1b12 announce logic out of inbox and into separate feps module
1b12 announces were previously only happening for local creates and received
activities, but they should happen for all local activities as well.

re: #13072
2025-02-07 08:21:41 -05:00
Julian Lam
d644c0f41c refactor: acceptable types in context.js to index.js, allow searching for remote topis by topic url 2025-01-30 16:41:55 -05:00
Julian Lam
af4d07fba4 feat: fix activitypub toggler to be more complete; tests. #13054 2025-01-20 12:05:17 -05:00
Julian Lam
450322d12f fix: handle ap send errors with object body 2025-01-09 11:17:53 -05:00
Julian Lam
39705a1796 fix: #13017, probe redirection if url is identical to id 2024-12-30 14:53:56 -05:00
Barış Soner Uşaklı
45021b5bfa fix: add missing catch, closes #13012 2024-12-25 10:43:02 -05:00
Barış Soner Uşaklı
40257663a8 refactor: use helpers.log 2024-12-25 09:00:12 -05:00
Julian Lam
25d6ef432b fix: add 10s timeout for AP message send 2024-12-16 22:38:10 -05:00