dotCMS / dotCMS/core

Error when uploading files starting with "webp", "jpeg" or "jpegp"

Open
#34,730 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OKR : Customer Support Team : Maintenance
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem Statement

When attempting to upload files starting with "webp", "jpeg" or "jpegp", a error is thrown preventing finishing the operation.

Image
dotcms-receiver-1      | 17:10:18.516  WARN  filter.JpegImageFilter - unable to convert file:/data/shared/assets/tmp_upload/temp_fe761cdd75/jpegDean.vtl : Cannot invoke "java.awt.image.BufferedImage.getWidth()" because "src" is null
dotcms-receiver-1      | 17:10:18.518  WARN  filter.JpegImageFilter - com.dotmarketing.image.filter.JpegImageFilter.runFilter(JpegImageFilter.java:78)
dotcms-receiver-1      | 17:10:18.518  ERROR servlets.BinaryExporterServlet - [BinaryContentExporterException] An error occurred when accessing '/image/temp_fe761cdd75/temp/byInode/true/jpeg_q/75': unable to convert file:/data/shared/assets/tmp_upload/temp_fe761cdd75/jpegDean.vtl : Cannot invoke "java.awt.image.BufferedImage.getWidth()" because "src" is null
dotcms-receiver-1      | 17:10:26.174  INFO  REQUEST COST MONITOR > - Last 60s: Reqs: 64, Cost: 1646.00, Avg Cost: 25.72 | Totals: Reqs: 611, Cost: 15051.00, Avg Cost: 24.63
dotcms-receiver-1      | 17:10:42.316  WARN  servlets.BinaryExporterServlet - org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe Error for = /contentAsset/raw-data/a31cae70-b6fa-4f1b-abb5-ee31ac9052ef/asset/byInode/true
dotcms-receiver-1      | 17:10:42.321  WARN  servlets.BinaryExporterServlet - org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe Error for = /contentAsset/raw-data/9ee6a560-01b3-4214-be65-2e9388e70253/asset/byInode/true
dotcms-receiver-1      | 17:10:42.503  WARN  servlets.BinaryExporterServlet - org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe Error for = /contentAsset/raw-data/9ee6a560-01b3-4214-be65-2e9388e70253/asset/byInode/true
dotcms-receiver-1      | 17:10:42.548  WARN  servlets.BinaryExporterServlet - org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe Error for = /contentAsset/raw-data/a31cae70-b6fa-4f1

This issue was introduced with these changes https://github.com/dotCMS/core/commit/959a5858242ce9c89616a75052855bbf9a801997

Steps to Reproduce

Attempt to upload a file or image whose name starts with "webp", "jpeg" or "jpegp"

Acceptance Criteria

Uploading files or images whose names start with "webp", "jpeg" or "jpegp" work as expected

dotCMS Version

trunk / 26.02.17-01_2263c4e

Severity

Medium - Some functionality impacted

Links

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in JpegImageFilter.java at line 78 and review the changes from commit 959a5858242ce9c89616a75052855bbf9a801997. Reproduce the problem by uploading files whose names start with "webp", "jpeg" or "jpegp". Done means those uploads complete without the reported conversion error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.