From e30b54decedf9598e3732632b98e3310a63c0ab1 Mon Sep 17 00:00:00 2001 From: Michael Rush Date: Fri, 11 Dec 2015 16:49:28 -0800 Subject: [PATCH] check for null queryString in handleSignatureRequest() check for null queryString in handleSignatureRequest() before performing contains() check. In Tomcat 8, this value is null when the query string is empty (Ah Java how you love the NPE's...) --- java/s3/S3Uploads.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/s3/S3Uploads.java b/java/s3/S3Uploads.java index 25f2cb5..eb9a2ff 100644 --- a/java/s3/S3Uploads.java +++ b/java/s3/S3Uploads.java @@ -93,7 +93,7 @@ private void handleSignatureRequest(HttpServletRequest req, HttpServletResponse JsonElement contentJson = jsonParser.parse(req.getReader()); JsonObject jsonObject = contentJson.getAsJsonObject(); - if (req.getQueryString().contains("v4=true")) { + if (req.getQueryString() != null && req.getQueryString().contains("v4=true")) { handleV4SignatureRequest(jsonObject, contentJson, req, resp); } else {