Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1965

Prevent NPE on decrypting a null password

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.0.0
    • admin
    • None

    Description

      If no password is specified, the logs show a NPE:

      java.lang.NullPointerException
          at com.sun.jersey.core.util.Base64.decode(Base64.java:324)
          at org.apache.ranger.plugin.util.PasswordUtils.decrypt(PasswordUtils.java:126)
          at org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:120)
          at org.apache.ranger.plugin.client.BaseClient.login(BaseClient.java:108)
          at org.apache.ranger.plugin.client.BaseClient.<init>(BaseClient.java:61)
          at org.apache.ranger.services.sqoop.client.SqoopClient.<init>(SqoopClient.java:74)
          at org.apache.ranger.services.sqoop.client.SqoopClient.getSqoopClient(SqoopClient.java:357)
          at org.apache.ranger.services.sqoop.client.SqoopClient.connectionTest(SqoopClient.java:321)

      Instead, we should only try to decrypt the password if it's not null.

      Attachments

        Issue Links

          Activity

            People

              coheigea Colm O hEigeartaigh
              coheigea Colm O hEigeartaigh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: