Skip to content

Allow certain specified ranges to bypass protections#28

Merged
jeffw16 merged 6 commits intomywikis:mainfrom
WikibaseSolutions:iprange-restriction-bypass
Apr 8, 2026
Merged

Allow certain specified ranges to bypass protections#28
jeffw16 merged 6 commits intomywikis:mainfrom
WikibaseSolutions:iprange-restriction-bypass

Conversation

@marijnvanwezel
Copy link
Copy Markdown
Contributor

This pull request, when merged, allows an administrator to specify certain IP-ranges that can bypass the restrictions imposed by CrawlerProtection. This can be useful to e.g. allow internal networks or crawlers coming from certain tools.

The administrator can specify a number of IP-ranges to allow using $wgCrawlerProtectionAllowedIPs. For example:

$wgCrawlerProtectionAllowedIPs = [ '192.168.0.1' ]; // Allow only 192.168.0.1
$wgCrawlerProtectionAllowedIPs = [ '10.0.0.0/8', '172.16.0.0-172.31.255.255', '192.168.0.0/16' ]; // Allow local connections
$wgCrawlerProtectionAllowedIPs = [ '13.52.5.96/28' ]; // Allow some monitoring tool

@jeffw16
Copy link
Copy Markdown
Member

jeffw16 commented Apr 8, 2026

This looks great. @marijnvanwezel Would you be able to bump the version in extension.json to 1.4.0 please? Thank you!

@jeffw16
Copy link
Copy Markdown
Member

jeffw16 commented Apr 8, 2026

There are some tests failing though. This may be related to incompatibility with PHP 7.4.

@marijnvanwezel
Copy link
Copy Markdown
Contributor Author

@jeffw16 Thanks, I incremented the version to 1.4.0 and hopefully fixed the compatibility and styling issues.

Copy link
Copy Markdown
Member

@jeffw16 jeffw16 left a comment

Choose a reason for hiding this comment

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

LGTM

@jeffw16 jeffw16 merged commit 703b6ab into mywikis:main Apr 8, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants