Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-815

Maven Archiver: MavenArchiver.addManifestAttribute does not escape empty lines in value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • maven-archiver-3.4.0
    • None
    • maven-archiver
    • None

    Description

      According to https://docs.oracle.com/javase/10/docs/specs/jar/jar.html#name-value-pairs-and-sections

      Groups of name-value pairs are known as a "section". Sections are separated from other sections by empty lines.

      Therefore empty lines in attribute values lead to invalid manifests and must somehow be escaped.
      As this is not done by default in java.util.jar.Attributes.writeMain(...) the method MavenArchiver.addManifestAttribute(...) should either throw an exception in case of empty lines given to parameter value or escape those empty lines somehow (https://github.com/apache/maven-archiver/blob/d454ab3fcd147c0201a14f298cc8f9e1a25ba03e/src/main/java/org/apache/maven/archiver/MavenArchiver.java#L221).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: