Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-302

DefaultHasher does not generate random salt

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: Cryptography & Hashing
    • Labels:
      None

      Description

      Extract from DefaultHasher javadoc: When a salt is not specified in a request, this implementation generates secure random salts via its

      {@link #setRandomNumberGenerator(org.apache.shiro.crypto.RandomNumberGenerator) randomNumberGenerator}

      property.

      Random salt is generated, but never assigned (line 155):
      if (publicSaltBytes == null)

      { getRandomNumberGenerator().nextBytes().getBytes(); }

        Attachments

          Activity

            People

            • Assignee:
              kaosko Kalle Korhonen
              Reporter:
              meri Maria Jurcovicova
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified