Shiro
  1. Shiro
  2. SHIRO-302

DefaultHasher does not generate random salt

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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(); }

        Activity

        Les Hazlewood made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Kalle Korhonen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.2.0 [ 12315478 ]
        Resolution Fixed [ 1 ]
        Kalle Korhonen made changes -
        Assignee Kalle Korhonen [ kaosko ]
        Maria Jurcovicova made changes -
        Field Original Value New Value
        Attachment patch-defaulthasher.patch [ 12481319 ]
        Maria Jurcovicova created issue -

          People

          • Assignee:
            Kalle Korhonen
            Reporter:
            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

                Development