diff --git src/wp-includes/class-wp-session-tokens.php src/wp-includes/class-wp-session-tokens.php
index 9482e1b948..4371285836 100644
|
|
|
abstract class WP_Session_Tokens { |
| 129 | 129 | $session = apply_filters( 'attach_session_information', array(), $this->user_id ); |
| 130 | 130 | $session['expiration'] = $expiration; |
| 131 | 131 | |
| | 132 | // Get the IP address and user-agent. |
| | 133 | $remote_addr = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP); |
| | 134 | |
| 132 | 135 | // IP address. |
| 133 | | if ( ! empty( $_SERVER['REMOTE_ADDR'] ) ) { |
| 134 | | $session['ip'] = $_SERVER['REMOTE_ADDR']; |
| | 136 | if ( ! empty( $remote_addr ) ) { |
| | 137 | $session['ip'] = $remote_addr; |
| 135 | 138 | } |
| 136 | 139 | |
| 137 | 140 | // User-agent. |