Skip to content
Permalink
Browse files
Fixed: Escape potential NPE when call by DataEvents.serverImage by mo…
…cked request

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857456 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
nmalin committed Apr 13, 2019
1 parent d505634 commit 3300682de593239c4872f86db7c070fa5608f688
Showing with 1 addition and 1 deletion.
  1. +1 −1 applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java
@@ -276,7 +276,7 @@ public static String serveImage(HttpServletRequest request, HttpServletResponse

// hack for IE and mime types
String userAgent = request.getHeader("User-Agent");
if (userAgent.indexOf("MSIE") > -1) {
if (userAgent != null && userAgent.indexOf("MSIE") > -1) {
Debug.logInfo("Found MSIE changing mime type from - " + mimeType, module);
mimeType = "application/octet-stream";
}

0 comments on commit 3300682

Please sign in to comment.