Uploaded image for project: 'Bitrepository'
  1. Bitrepository
  2. BITMAG-892

Getchecksums command line client only accepts algorithms with an even number of characters when also specifying checksum salt

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.26
    • 0.24
    • Commandline client
    • None
    • Hide

      Use the 'getchecksums.sh' from the cmdclient with the salt parameter. Validate by using both the 'MD5' and 'SHA1' algorithms without issues.

      Show
      Use the 'getchecksums.sh' from the cmdclient with the salt parameter. Validate by using both the 'MD5' and 'SHA1' algorithms without issues.

    Description

      When specifying algorithm manually using the -R parameter and also specifying salt using the -S parameter, validation fails if the argument to -R is an odd number of characters:

      [assf@int-bitmag-01 bitrepository-command-line-0.24-SNAPSHOT]$ ./getchecksums.sh -c integrationtest1 -i foo -R MD5 -S abab

      Initialising arguments...
      Creating client.
      Performing the GetChecksums operation.
      Exception in thread "main" java.lang.IllegalArgumentException: String hexString, 'MD5', must be an even number of characters.
      at org.bitrepository.common.ArgumentValidator.checkTrue(ArgumentValidator.java:160)
      at org.bitrepository.common.utils.Base16Utils.encodeBase16(Base16Utils.java:64)
      at org.bitrepository.commandline.GetChecksums.getRequestChecksumSpec(GetChecksums.java:115)
      at org.bitrepository.commandline.GetChecksums.performOperation(GetChecksums.java:94)
      at org.bitrepository.commandline.GetChecksums.main(GetChecksums.java:48)

      Attachments

        Issue Links

          Activity

            People

              jolf Jonas Lindberg Frellesen (Inactive)
              assf@kb.dk Asser Schrøder Femø (Inactive)
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: