Commit graph

22 commits

Author SHA1 Message Date
2ea6daaf7a
rename extractDbHost to extractPunyHost
Some checks failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
2023-06-27 22:02:32 +02:00
de3cdb5833
activitypub: block check for resolving collections 2022-12-24 18:39:44 -05:00
a8f82050c8
activitypub: perform resolver block check on objects as well 2022-12-24 18:39:44 -05:00
275136cf8b
allow redirects in API ap/* endpoints 2022-12-21 20:45:55 +01:00
3582fd8260
activitypub: centrally check id matches URL in resolver
This makes some duplicated checks in models/note and models/person
unnecessary.
2022-12-15 00:29:39 +01:00
8e9c65fab0
chore: fix some import related lints 2022-12-13 23:09:31 +01:00
3ef1a4b0f9
refactor: remove default export for Resolver 2022-12-11 18:23:07 +01:00
c1a51547a9 BREAKING: server: remove wildcard blocking and instead block subdomains (#269)
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Co-authored-by: Francis Dinh <normandy@biribiri.dev>
Reviewed-on: #269
Changelog: Changed
2022-12-05 17:55:38 +00:00
b4080d788d
slight refactoring & translating japanese 2022-12-02 19:00:58 +01:00
e10700a2be Merge pull request 'server: add wildcard matching to blocked hosts' (#260) from wildcard-block-v2 into main
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Reviewed-on: #260
2022-12-01 20:12:18 +00:00
721a327192
fixup: remove unused import
Some checks failed
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
2022-12-01 20:46:46 +01:00
075e251822
server: add wildcard matching to blocked hosts
This adds in wildcard matching. For instance:
- `*.bad.tld` will match: `very.bad.tld`
- `bad.*` will match: `bad.something`
- `*.bad.*` will match: `very.bad.evil`

Changelog: Changed
2022-12-01 11:29:02 -05:00
Derek Schmidt
d3af00a912
server: Add recursion limit to resolver
Changelog: Security
2022-12-01 04:40:07 -05:00
8e5a350f1b Simplify fetching object in resolver.ts
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/test Pipeline failed
this.user will always be true, so we aren't doing unsigned fetches.
2022-08-21 13:13:34 -04:00
77bfc2450d Remove signToActivityPubGet option
Some checks failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
Makes it so that all requests are signed, equivalent to
signToActivityPubGet always being true.
2022-08-21 12:38:43 -04:00
6ce4b3fe2f
fix some lints
Some checks failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/test Pipeline failed
Many of these were fixed automatically with eslint --fix.

Some of them (e.g. adding return types to functions) were done manually.
2022-08-11 00:09:29 +02:00
37e47a257e
fix lints "import/order" and "import/no-duplicate"
Some checks failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/test Pipeline failed
Also simplified some import paths by replacing relative with absolute paths.
2022-08-03 14:05:50 +02:00
ba0236700d
chore: remove unused imports 2022-07-12 14:41:10 +02:00
9954c054a7
fix: ensure resolver does not fetch local resources via HTTP(S) (#8733)
* refactor: parseUri types and checks

The type has been refined to better represent what it actually is. Uses of
parseUri are now also checking the parsed object type before resolving.

* cannot resolve URLs with fragments

* also take remaining part of URL into account

Needed for parsing the follows URIs.

* Resolver uses DbResolver for local

* remove unnecessary use of DbResolver

Using DbResolver would mean that the URL is parsed and handled again.
This duplicated processing can be avoided by querying the database directly.

* fix missing property name
2022-06-04 11:29:20 +09:00
syuilo
2d2b3edaaf refactor: fix type 2022-04-17 13:26:31 +09:00
syuilo
d071d18dd7
refactor: Use ESM (#8358)
* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
2022-02-27 11:07:39 +09:00
syuilo
0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00
Renamed from src/remote/activitypub/resolver.ts (Browse further)