Skip to content

Move ban checking from WCF boot to middleware#4935

Merged
TimWolla merged 3 commits intomasterfrom
ban-middleware
Aug 8, 2022
Merged

Move ban checking from WCF boot to middleware#4935
TimWolla merged 3 commits intomasterfrom
ban-middleware

Conversation

@TimWolla
Copy link
Copy Markdown
Member

@TimWolla TimWolla commented Aug 8, 2022

The previous location in WCF made sense back when initBlacklist() also
checked the IP address, User-Agent, or hostname blocklist to prevent processing
the request as much as possible. As all these checks are gone now, the only
thing that remains is the inexpensive ban check.

Move it into a middleware, it does not really belong into WCF which should just
be responsible for booting the framework independently of the request in
question.

The previous location in WCF made sense back when `initBlacklist()` also
checked the IP address, User-Agent, or hostname blocklist to prevent processing
the request as much as possible. As all these checks are gone now, the only
thing that remains is the inexpensive ban check.

Move it into a middleware, it does not really belong into WCF which should just
be responsible for booting the framework independently of the request in
question.
@TimWolla TimWolla requested a review from BurntimeX August 8, 2022 09:32
Comment thread wcfsetup/install/files/lib/http/middleware/CheckUserBan.class.php
Copy link
Copy Markdown
Member

@BurntimeX BurntimeX left a comment

Choose a reason for hiding this comment

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

LGTM

@TimWolla TimWolla merged commit 670e7ca into master Aug 8, 2022
@TimWolla TimWolla deleted the ban-middleware branch August 8, 2022 11:42
TimWolla added a commit that referenced this pull request Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants