Index: src/wp-admin/includes/class-wp-community-events.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-admin/includes/class-wp-community-events.php	(revision 03cd8d5b7013b5c2ec655e528035c6765c3b1d6e)
+++ src/wp-admin/includes/class-wp-community-events.php	(revision )
@@ -257,7 +257,10 @@
 				 * trusted for authenticity, but we don't need to for this purpose.
 				 */
 				$address_chain = explode( ',', $_SERVER[ $header ] );
-				$client_ip     = trim( $address_chain[0] );
+				$client_ip     = trim( $address_chain[0] ) . ':';
+
+				// Strip port from IP so it can be used with inet_ functions.
+				$client_ip     = substr($client_ip, 0, strpos($client_ip, ":"));
 
 				break;
 			}
