Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-1769

KsmRecordService.getField() may throw a NullPointerException if getCustom() returns null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5.0
    • 1.5.2
    • guacamole-vault-ksm
    • None

    Description

      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:

      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)
      ...
      

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

      Attachments

        Activity

          People

            mjumper Mike Jumper
            mjumper Mike Jumper
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: