sporeno commented on a change in pull request #398: GUACAMOLE-784: Tolerate 
port number within X-Forwarded-For header
URL: https://github.com/apache/guacamole-client/pull/398#discussion_r280661412
 
 

 ##########
 File path: 
guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java
 ##########
 @@ -93,12 +93,12 @@
     /**
      * Regular expression which matches any IPv4 address.
      */
-    private static final String IPV4_ADDRESS_REGEX = 
"([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})";
+    private static final String IPV4_ADDRESS_REGEX = 
"([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})(?::[0-9]{1,5})?";
 
 Review comment:
   Another way may would be to create e new constant PORT_NUMBER_REGEX. And 
combine it within the X_FORWARDED_FOR Constant. Then you have an impended Port 
Regex and the renaming can be avoided.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to