Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
check for null queryString in handleSignatureRequest()
Browse files Browse the repository at this point in the history
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...)
  • Loading branch information
rushimusmaximus committed Dec 12, 2015
1 parent da0c7be commit e30b54d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/s3/S3Uploads.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e30b54d

Please sign in to comment.