jenkins-bot has submitted this change and it was merged.
Change subject: Whitelist our IPv6 range
......................................................................
Whitelist our IPv6 range
Bug: 52018
Change-Id: I2eae2b3b6dbc20774c71e242bacc3c95bdb08cb9
---
M wmf-config/squid.php
1 file changed, 9 insertions(+), 0 deletions(-)
Approvals:
MaxSem: Looks good to me, approved
jenkins-bot: Verified
diff --git a/wmf-config/squid.php b/wmf-config/squid.php
index b8b8bcf..b7babba 100644
--- a/wmf-config/squid.php
+++ b/wmf-config/squid.php
@@ -240,3 +240,12 @@
'62.214.230.86',
'217.94.171.96',
);
+
+# Because the above variables don't support subnets, we'll have to do this the
hard way
+$wgHooks['IsTrustedProxy'][] = function( &$ip, &$trusted ) {
+ # No need to do a full IPv6 validation here
+ if ( !$trusted && strpos( $ip, ':' ) ) {
+ $trusted = IP::isInRange( $ip, '2620:0:860::/46' );
+ }
+ return true;
+};
--
To view, visit https://gerrit.wikimedia.org/r/76205
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2eae2b3b6dbc20774c71e242bacc3c95bdb08cb9
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits