Skip to content

Commit

Permalink
CR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Aug 24, 2022
1 parent 3ae9a38 commit c0ba458
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions restricted_site_access.php
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ public static function get_client_ip_address() {
return '';
}

/*
/**
* Filter hook to set array of trusted proxies.
*
* Some reverse proxies (like AWS Elastic Load Balancing) don't have
Expand Down Expand Up @@ -1583,7 +1583,7 @@ public static function get_ip_from_headers() {
'HTTP_FORWARDED',
);

/*
/**
* Filter hook to set array of trusted IP address headers.
*
* Most CDN providers will set the IP address of the client in a number
Expand Down
6 changes: 0 additions & 6 deletions tests/php/test-ip-addresses.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public function test_rsa_trusted_proxies() {

$this->assertSame( '127.0.0.1', $rsa::get_client_ip_address() );

// Reset the filter.
add_filter( 'rsa_trusted_proxies', '__return_empty_array' );
unset( $_SERVER['REMOTE_ADDR'] );
}

Expand Down Expand Up @@ -153,10 +151,6 @@ public function test_rsa_trusted_headers() {
unset( $_SERVER['HTTP_X_FORWARDED'] );
unset( $_SERVER['HTTP_FORWARDED'] );

// Reset things.
add_filter( 'rsa_get_client_ip_address_filter_flags', function() {
return FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE;
} );
unset( $_SERVER['REMOTE_ADDR'] );
}

Expand Down

0 comments on commit c0ba458

Please sign in to comment.