[
https://issues.apache.org/jira/browse/HDDS-2158?focusedWorklogId=321565&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-321565
]
ASF GitHub Bot logged work on HDDS-2158:
----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Oct/19 21:46
Start Date: 01/Oct/19 21:46
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_r330291228
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/bucket/AddAclBucketHandler.java
##########
@@ -92,8 +92,8 @@ public Void call() throws Exception {
boolean result = client.getObjectStore().addAcl(obj,
OzoneAcl.parseAcl(acl));
- System.out.printf("%s%n", JsonUtils.toJsonStringWithDefaultPrettyPrinter(
- JsonUtils.toJsonString("Acl set successfully: " + result)));
+ System.out.printf("%s%n", result ? "ACL set successfully" : "ACL not set");
Review comment:
False means Acl passed is already existing, in this case we return false. So
message `ACL not set `is meaningful here or do we need to reword this?
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 321565)
Time Spent: 1h 50m (was: 1h 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: 1h 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
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]