You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "mridulpathak (via GitHub)" <gi...@apache.org> on 2026/08/10 14:18:58 UTC
[PR] Fixed: noWebshellInMetadata NPEs when readMetadata can't parse the file [ofbiz-framework]
mridulpathak opened a new pull request, #1622:
URL: https://github.com/apache/ofbiz-framework/pull/1622
Imaging.guessFormat() only checks a file's magic number, so a malformed file that still starts with a valid PNG/JPEG/GIF/TIFF signature reaches noWebshellInMetadata(). When ImageMetadataReader.readMetadata() then fails to parse it, metadata stayed null and the following metadata.getDirectories() call threw an unhandled NullPointerException instead of rejecting the upload cleanly. Confirmed live against metadata-extractor:2.20.0 with a minimal 8-byte file containing only the PNG signature. Returns false in the catch block so the file is rejected the same way any other unparseable upload is.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fixed: noWebshellInMetadata NPEs when readMetadata can't parse the file [ofbiz-framework]
Posted by "mridulpathak (via GitHub)" <gi...@apache.org>.
mridulpathak merged PR #1622:
URL: https://github.com/apache/ofbiz-framework/pull/1622
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org