Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/guacamole-client/pull/242#discussion_r165833012
  
    --- Diff: 
extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
 ---
    @@ -282,15 +282,15 @@ public RadiusPacket authenticate(String username, 
String secret, String state)
          * @throws GuacamoleException
          *     If an error is encountered trying to talk to the RADIUS server.
          */
    -    public RadiusPacket sendChallengeResponse(String username, String 
response, String state)
    +    public RadiusPacket sendChallengeResponse(String username, String 
response, byte[] state)
                 throws GuacamoleException {
     
             if (username == null || username.isEmpty()) {
                 logger.error("Challenge/response to RADIUS requires a 
username.");
                 return null;
             }
     
    -        if (state == null || state.isEmpty()) {
    +        if (state == null || state.length < 1) {
    --- End diff --
    
    Testing whether the array length is less than one is an odd way to check 
whether the array is empty. There is exactly one length value which represents 
an empty array, and while that value is indeed less than one, it'd make more 
sense to test against that value directly.


---

Reply via email to