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

ExifToolProcessor should not crash if filename is null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.5
    • Component/s: Binary Metadata
    • Tags:
    • Team:
      FG
    • Sprint:
      nxFG 11.3.1
    • Story Points:
      1

      Description

      If a blob has a null filename it leads ExifToolProcessor to fail, yet filename should not be needed for it.

      We should modify its behaviour to avoid failing in such case.

      Such situation could happen if BatchUpload is used without specifying the filename header as described inĀ NXP-30112

      Example stacktrace coming from Datadog in such case:

      java.lang.NullPointerException: null
      at java.util.regex.Matcher.getTextLength(Matcher.java:1283) ~[?:1.8.0_275]
      at java.util.regex.Matcher.reset(Matcher.java:309) ~[?:1.8.0_275]
      at java.util.regex.Matcher.<init>(Matcher.java:229) ~[?:1.8.0_275]
      at java.util.regex.Pattern.matcher(Pattern.java:1093) ~[?:1.8.0_275]
      at org.nuxeo.binary.metadata.internals.ExifToolProcessor.getTemporaryFile(ExifToolProcessor.java:258) ~[nuxeo-binary-metadata-10.10-HF21.jar:?]
      at org.nuxeo.binary.metadata.internals.ExifToolProcessor.readMetadata(ExifToolProcessor.java:130) ~[nuxeo-binary-metadata-10.10-HF21.jar:?]
      at org.nuxeo.binary.metadata.internals.ExifToolProcessor.readMetadata(ExifToolProcessor.java:150) ~[nuxeo-binary-metadata-10.10-HF21.jar:?]
      at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.readMetadata(BinaryMetadataServiceImpl.java:70) ~[nuxeo-binary-metadata-10.10-HF21.jar:?]
      at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.writeMetadata(BinaryMetadataServiceImpl.java:195) ~[nuxeo-binary-metadata-10.10-HF21.jar:?]
      at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.writeMetadata(BinaryMetadataServiceImpl.java:170) ~[nuxeo-binary-metadata-10.10-HF21.jar:?]
      at org.nuxeo.binary.metadata.internals.listeners.BinaryMetadataSyncListener.handleEvent(BinaryMetadataSyncListener.java:56) ~[nuxeo-binary-metadata-10.10-HF21.jar:?]
      at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:242) [nuxeo-core-event-10.10-HF34.jar:?]
      at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:270) [nuxeo-core-10.10-HF36.jar:?]
      at org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:708) [nuxeo-core-10.10-HF36.jar:?]
      at org.nuxeo.ecm.restapi.server.jaxrs.JSONDocumentObject.doPost(JSONDocumentObject.java:100) [nuxeo-rest-api-server-10.10-HF32.jar:?]
      ...
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 hour
                  1h