[ 
https://issues.apache.org/jira/browse/HDFS-16239?focusedWorklogId=658501&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-658501
 ]

ASF GitHub Bot logged work on HDFS-16239:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Sep/21 17:13
            Start Date: 30/Sep/21 17:13
    Worklog Time Spent: 10m 
      Work Description: prasad-acit commented on a change in pull request #3491:
URL: https://github.com/apache/hadoop/pull/3491#discussion_r719606743



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/fs/XAttr.java
##########
@@ -158,6 +158,6 @@ public boolean equalsIgnoreValue(Object obj) {
   @Override
   public String toString() {
     return "XAttr [ns=" + ns + ", name=" + name + ", value="
-        + Arrays.toString(value) + "]";
+        + new String(value, Charset.defaultCharset()) + "]";

Review comment:
       Thanks @Hexiaoqiao & @jojochuang for quick review & feedback.
   I faced this issue while printing custom properties on debugging some issue.
   I tried to print the xAttr directly as it has toString implementation. We 
can make use of AXttrCodec utility for conversion.
   
   Printing EDEKs or any other sensitive is vulnerable? If so, we can remove 
the bytes printing in toString. Otherwise, we shall close the issue directly? 
Thank you.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 658501)
    Time Spent: 1h 50m  (was: 1h 40m)

> XAttr#toString doesnt print the attribute value in readable format
> ------------------------------------------------------------------
>
>                 Key: HDFS-16239
>                 URL: https://issues.apache.org/jira/browse/HDFS-16239
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Renukaprasad C
>            Assignee: Renukaprasad C
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> org.apache.hadoop.fs.XAttr#toString prints the value of attribute in bytes. 
> return "XAttr [ns=" + ns + ", name=" + name + ", value="
>  + Arrays.toString(value) + "]";
> XAttr [ns=SYSTEM, name=az.expression, value=[82, 69, 80, 91, 50, 93......]
> This should be converted to String rather than printing to Array of bytes.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to