mike-jumper commented on a change in pull request #392: GUACAMOLE-774: Add in
MD4 support for MSCHAPv1/2
URL: https://github.com/apache/guacamole-client/pull/392#discussion_r313084041
##########
File path:
extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProviderModule.java
##########
@@ -57,6 +62,24 @@ public
RadiusAuthenticationProviderModule(AuthenticationProvider authProvider)
// Get local environment
this.environment = new LocalEnvironment();
+
+ // Check for MD4 requirement
+ RadiusAuthenticationProtocol authProtocol =
environment.getProperty(RadiusGuacamoleProperties.RADIUS_AUTH_PROTOCOL);
+ RadiusAuthenticationProtocol innerProtocol =
environment.getProperty(RadiusGuacamoleProperties.RADIUS_EAP_TTLS_INNER_PROTOCOL);
+ if ((authProtocol != null
+ && (authProtocol == RadiusAuthenticationProtocol.MSCHAPv1
+ || authProtocol == RadiusAuthenticationProtocol.MSCHAPv2))
+ || (innerProtocol != null
+ && (innerProtocol == RadiusAuthenticationProtocol.MSCHAPv1
+ || innerProtocol ==
RadiusAuthenticationProtocol.MSCHAPv2))) {
Review comment:
You might be able to clean up this logic if you remove the `null` checks,
which are unnecessary in this case. The `==` comparisons will just fail if
`authProtocol` or `innerProtocol` are `null`.
----------------------------------------------------------------
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