Mike Jumper created GUACAMOLE-1769:
--------------------------------------

             Summary: KsmRecordService.getField() may throw a 
NullPointerException if getCustom() returns null
                 Key: GUACAMOLE-1769
                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1769
             Project: Guacamole
          Issue Type: Bug
          Components: guacamole-vault-ksm
    Affects Versions: 1.5.0
            Reporter: Mike Jumper


The {{getCustom()}} function of {{KeeperRecordData}} as defined by the KSM SDK 
is permitted to return {{null}} (it is annotated {{@Nullable}}), however 
Guacamole's support for KSM assumes that it will always return a {{List}}, 
resulting in a {{NullPointerException}} if it ever does return {{null}}:

{code:none}
java.lang.NullPointerException
        at 
org.apache.guacamole.vault.ksm.secret.KsmRecordService.getField(KsmRecordService.java:241)
        at 
org.apache.guacamole.vault.ksm.secret.KsmRecordService.getField(KsmRecordService.java:312)
        at 
org.apache.guacamole.vault.ksm.secret.KsmRecordService.getHostname(KsmRecordService.java:397)
...
{code}

Things should be corrected as necessary to handle {{null}} identically to an 
empty {{List}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to