hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-2158) Fix Json Injection in JsonUtils
Date Tue, 24 Sep 2019 22:00:03 GMT

     [ https://issues.apache.org/jira/browse/HDDS-2158?focusedWorklogId=317877&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-317877

ASF GitHub Bot logged work on HDDS-2158:

                Author: ASF GitHub Bot
            Created on: 24/Sep/19 21:59
            Start Date: 24/Sep/19 21:59
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #1486: HDDS-2158. Fixing
Json Injection Issue in JsonUtils.
URL: https://github.com/apache/hadoop/pull/1486#discussion_r327852770

 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/bucket/AddAclBucketHandler.java
 @@ -92,8 +92,9 @@ public Void call() throws Exception {
     boolean result = client.getObjectStore().addAcl(obj,
-    System.out.printf("%s%n", JsonUtils.toJsonStringWithDefaultPrettyPrinter(
-        JsonUtils.toJsonString("Acl set successfully: " + result)));
+    System.out.printf("%s%n", "Acl set successfully: " +
+        JsonUtils.toJsonStringWithDefaultPrettyPrinter(result));
 Review comment:
   Here the result is true/false, we can directly print. Do we need toJsonStringWithDefaultPrettyPrinter
here? Previously this was called with Acl set successfully: + result. But now just result,
so is it okay if we directly use result to print?
   Same comment for all AclHandler classes.
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.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 317877)
    Time Spent: 50m  (was: 40m)

> Fix Json Injection in JsonUtils
> -------------------------------
>                 Key: HDDS-2158
>                 URL: https://issues.apache.org/jira/browse/HDDS-2158
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Hanisha Koneru
>            Assignee: Hanisha Koneru
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
> JsonUtils#toJsonStringWithDefaultPrettyPrinter() does not validate the Json StringĀ 
before serializing it which could result in Json Injection.

This message was sent by Atlassian Jira

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message