You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/01/30 23:44:25 UTC

[13/50] guacamole-client git commit: GUACAMOLE-197: Clean up logic for retrieving radius state.

GUACAMOLE-197: Clean up logic for retrieving radius state.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/564b9687
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/564b9687
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/564b9687

Branch: refs/heads/master
Commit: 564b9687a21ec61f5527078713538c83d63fe9b8
Parents: 6402cec
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:15:39 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/AuthenticationProviderService.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/564b9687/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index d9de261..bb2e203 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -109,7 +109,6 @@ public class AuthenticationProviderService {
 
         // Try to get parameters to see if this is a post-challenge attempt
         String challengeResponse = request.getParameter(RadiusChallengeResponseField.PARAMETER_NAME);
-        String radiusState = request.getParameter(RadiusStateField.PARAMETER_NAME);
 
         // We do not have a challenge response, so we proceed normally
         if (challengeResponse == null || challengeResponse.isEmpty()) {
@@ -159,7 +158,7 @@ public class AuthenticationProviderService {
 
                 // We have the required attributes - convert to strings and then generate the additional login box/field
                 String replyMsg = replyAttr.toString();
-                radiusState = new String(stateAttr.getValue().getBytes());
+                String radiusState = new String(stateAttr.getValue().getBytes());
                 Field radiusResponseField = new RadiusChallengeResponseField(replyMsg);
                 Field radiusStateField = new RadiusStateField(radiusState);
                 CredentialsInfo expectedCredentials = new CredentialsInfo(Arrays.asList(radiusResponseField,radiusStateField));
@@ -193,7 +192,7 @@ public class AuthenticationProviderService {
             // Initialize Radius Packet and try to authenticate
             try {
                 radPack = radiusService.authenticate(credentials.getUsername(),
-                                                     radiusState,
+                                                     request.getParameter(RadiusStateField.PARAMETER_NAME),
                                                      challengeResponse);
             }
             catch (GuacamoleException e) {