Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard against fetching local IP ranges #402

Open
andrewgodwin opened this issue Jan 13, 2023 · 6 comments · May be fixed by #679
Open

Guard against fetching local IP ranges #402

andrewgodwin opened this issue Jan 13, 2023 · 6 comments · May be fixed by #679
Labels
area/activitypub Sending or receiving ActivityPub bug Something isn't working pri/medium Medium Priority

Comments

@andrewgodwin
Copy link
Member

Anything that resolves to local IP ranges should not be allowed for actor fetching.

@andrewgodwin andrewgodwin added bug Something isn't working area/activitypub Sending or receiving ActivityPub pri/medium Medium Priority labels Jan 13, 2023
@andrewgodwin andrewgodwin moved this to Planned in Takahē 0.9 Jan 13, 2023
@cosmin
Copy link
Contributor

cosmin commented Jan 13, 2023

it would be good to have a development option to allow this, for testing federation for example. Perhaps an allow list of specific internal domain names to allow.

@andrewgodwin andrewgodwin moved this from Planned to In Progress in Takahē 0.9 Jan 14, 2023
@andrewgodwin andrewgodwin self-assigned this Jan 14, 2023
@andrewgodwin andrewgodwin moved this from In Progress to Planned in Takahē 0.9 Jan 14, 2023
@andrewgodwin andrewgodwin moved this from Planned to Maybe in Takahē 0.9 Jan 14, 2023
@andrewgodwin andrewgodwin moved this from Maybe to Planned in Takahē 0.9 Jan 17, 2023
@andrewgodwin andrewgodwin removed their assignment Jan 17, 2023
@andrewgodwin andrewgodwin moved this from Planned to Maybe in Takahē 0.9 Feb 19, 2023
@uda
Copy link

uda commented May 17, 2023

GitLab has implemented a logic similar to this, where by default they block domains resolving to local networks, but having a whitelist for both domains and IPs (domains - regardless of the actual target IP)

https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/30350

@AstraLuma
Copy link
Contributor

httpx.Client is used in about a half dozen places, and HttpSignature in a half dozen more. (Honestly, I was expecting more.)

My suggestion is to make an httpx wrapper client that encapsulates all the fedi HTTP client extensions. So far, that's:

Future additions might include:

  • HTTP/2 support
  • Async support
  • Tracing pass through
  • Tor Onion/IPFS/etc support

@AstraLuma AstraLuma linked a pull request Dec 12, 2023 that will close this issue
@andrewgodwin
Copy link
Member Author

My plan was to instead do all of this in https://github.com/jointakahe/taktivitypub so it's reuseable

@AstraLuma
Copy link
Contributor

Oh. Did you want #679?

@andrewgodwin
Copy link
Member Author

If you can make #679 roughly net-neutral in terms of code (i.e. remove the existing signing in the same PR) that's good to me. I don't know what the timeline would be for adding into the other thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/activitypub Sending or receiving ActivityPub bug Something isn't working pri/medium Medium Priority
Projects
Status: Maybe
Development

Successfully merging a pull request may close this issue.

4 participants