Griffon
  1. Griffon
  2. GRIFFON-534

The signature file name should be allowed to contain hyphens

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.0.2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When signing a jar file, the signature file is allowed to contain hyphens (i.e. the '-' character). I found the doc for valid characters here:

      Legal characters include letters, digits, underscores, and hyphens.

      If a signature file contains hyphens, and JNLP signing is enabled, griffon will create a main jar file that contains missing signed elements (the JNLP file). The result is that the application won't even execute.

      The fix is an easy one-liner (though it was hard to track). Make sure the isJarSigned method accepts all legal characters:

      griffon-1.0.1/scripts/_GriffonPackage.groovy, line 338

      replace:

      if (ze.name ==~ 'META-INF/\\w{1,8}\\.(SF|RSA|DSA)') {
      

      with

      if (ze.name ==~ 'META-INF/[\\w-]{1,8}\\.(SF|RSA|DSA)') {
      

      I.e. the \w reg.ex character class includes letters, digits and underscores. The hyphen should also be included.

        Activity

        Show
        Andres Almiray added a comment - Fixed with https://github.com/griffon/griffon/commit/11c7b45e47bac3fde88f385d657cd834e43af252

          People

          • Assignee:
            Andres Almiray
            Reporter:
            Steinar Haugen
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: