Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23459

Make IWork to PDF conversion more robust by checking the file format (no corruption)

    XMLWordPrintable

    Details

    • Release Notes Summary:
      The IWork to PDF conversion is now more robust by checking the file format
    • Backlog priority:
      600
    • Sprint:
      nxNest Sprint 9.3.10, nxNest Sprint 9.10.1
    • Story Points:
      3

      Description

      CPU running 100% with stack trace

      java.lang.Throwable.fillInStackTrace(Native Method)
      java.lang.Throwable.fillInStackTrace(Throwable.java:783)
      java.lang.Throwable.<init>(Throwable.java:250)
      java.lang.Exception.<init>(Exception.java:54)
      java.io.IOException.<init>(IOException.java:47)
      java.io.EOFException.<init>(EOFException.java:51)
      java.util.zip.ZipInputStream.readFully(ZipInputStream.java:426)
      java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:277)
      java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:121)
      org.nuxeo.common.utils.ZipUtils.getEntryNames(ZipUtils.java:551)
      org.nuxeo.common.utils.ZipUtils.hasEntry(ZipUtils.java:563)
      org.nuxeo.ecm.platform.convert.plugins.IWork2PDFConverter.convert(IWork2PDFConverter.java:62)
      org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:203)
      org.nuxeo.ecm.webapp.action.ConversionActionBean.generatePdfFileFromBlobHolder(ConversionActionBean.java:198)
      sun.reflect.GeneratedMethodAccessor2349.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:606)
      org.jboss.seam.util.Reflections.invoke(Reflections.java:22
      

      has been found if a document of type application/vnd.apple.keynote or application/octet-stream or application/x-iwork-keynote-sffkey and the document does not match the MIME type.

      The request is to check the ZIP file is not corrupted before extracting the content.

      More generally, a file validator should precede the converter part.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 30 minutes
                1d 1h 30m