Skip to content

Fix IP-based request blocking #7435

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

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Nov 2, 2023

As #7434 explains, IP-based request blocking is currently broken. This PR fixes the blocking based on the BLOCKED_IPS environment variable that we use on production.

@Turbo87 Turbo87 added C-bug 🐞 Category: unintended, undesired behavior A-backend ⚙️ labels Nov 2, 2023
Copy link
Contributor

@LawnGnome LawnGnome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It occurs to me that we should probably document BLOCKED_IPS somewhere at some point along with its exact semantics (comma separated, whitespace not ignored, unless we add a str::trim to the chain where we collect the HashSet from the environment variable), but I don't think that's important in this PR.

We should probably also add some tests for the blocking eventually, since this is all in-process now and we should be able to do so. Again, not urgent right now.

@Turbo87 Turbo87 enabled auto-merge (squash) November 2, 2023 16:19
@Turbo87 Turbo87 merged commit d1fc384 into rust-lang:main Nov 2, 2023
@Turbo87 Turbo87 deleted the blocked-ips branch November 2, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants