[ 
https://issues.apache.org/jira/browse/HADOOP-14001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15830642#comment-15830642
 ] 

Yongjun Zhang commented on HADOOP-14001:
----------------------------------------

HI [~ajisakaa] and [~tlipcon],

Per https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html

{code}
public static boolean isEqual(byte[] digesta,
              byte[] digestb)
Compares two digests for equality. Does a simple byte compare.
Parameters:
digesta - one of the digests to compare.
digestb - the other digest to compare.
Returns:
true if the digests are equal, false otherwise.
{code}

Seems the orginal code has same behavior as the changed code. The newer code 
looks more symbolic though. Would you please comment if there is any other diff?

Thanks.


> Improve delegation token validity checking
> ------------------------------------------
>
>                 Key: HADOOP-14001
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14001
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Akira Ajisaka
>            Assignee: Akira Ajisaka
>             Fix For: 2.8.0, 2.7.4, 3.0.0-alpha2
>
>         Attachments: HADOOP-14001.01.patch
>
>
> In AbstractDelegationSecretManager#verifyToken, MessageDigest.isEqual should 
> be used instead of Arrays.equals to compare byte arrays.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to