Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-27711

Encryptor.decrypt can choke if you pass in a null key

    Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed

      Description

      Startup the portal with an IBM JDK, now Company.key is using the default IBM JDK provider.

      Now start the portal with a Sun JDK, company.getKey() is null because it can't read the value from the Company.key table since it is a key that is using a provider that is not supported.

      Try signing in, big NullPointerException because bottom_js.jsp chokes on:

      encryptedUserId: '<%= Encryptor.encrypt(company.getKeyObj(), String.valueOf(themeDisplay.getUserId())) %>',

      This simply allows things to work and prints a warning. This should only happen in tests scenarios. Most ppl don't swap JDKs in production.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  8 years, 13 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2