You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@guacamole.apache.org by "Mike Jumper (Jira)" <ji...@apache.org> on 2023/04/13 21:21:00 UTC

[jira] [Closed] (GUACAMOLE-1769) KsmRecordService.getField() may throw a NullPointerException if getCustom() returns null

     [ https://issues.apache.org/jira/browse/GUACAMOLE-1769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Jumper closed GUACAMOLE-1769.
----------------------------------
    Fix Version/s: 1.5.2
       Resolution: Fixed

> 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
>            Assignee: Mike Jumper
>            Priority: Minor
>             Fix For: 1.5.2
>
>
> 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)