Uploaded image for project: 'Smack'
  1. Smack
  2. SMACK-891

StringUtils randomString methods could be more random

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
    • Expected Effort:
      Minimal

      Description

      Smacks StringUtils methods to create random strings often use the UNAMBIGUOUS_NUMBERS_AND_LETTER alphabet, which lacks lower case characters.

      Also there might be the demand for further XML safe character entropy, eg. XEP-0373 states that a message should be padded with random length random content padding which contains more than just numbers and letters, but also special characters.

      A method for such use cases would be nice.

      Lastly the javadoc of insecureRandomString(len) states that it would generate a random string of lower and upper case characters, while infact it delegates to randomString(len, random), which internally uses UNAMBIGUOUS_NUMBERS_AND_LETTER, which does not contain lower case chars at all.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            vanitasvitae vanitasvitae
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: