kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5802) ScramServerCallbackHandler#handle should check username not being null before calling credentialCache.get()
Date Fri, 22 Sep 2017 10:06:00 GMT

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

ASF GitHub Bot commented on KAFKA-5802:
---------------------------------------

GitHub user umesh9794 opened a pull request:

    https://github.com/apache/kafka/pull/3946

    KAFKA-5802 : ScramServerCallbackHandler#handle should check username not being null before
calling credentialCache.get()

    Pretty trivial and tested with `gradle clean client:test`

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/umesh9794/kafka KAFKA-5802

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/3946.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3946
    
----
commit 11f4610ac7f908b400415454632b20914fc15f5f
Author: umesh chaudhary <umesh9794@gmail.com>
Date:   2017-09-22T10:03:14Z

    KAFKA-5802

----


> ScramServerCallbackHandler#handle should check username not being null before calling
credentialCache.get()
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-5802
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5802
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>         String username = null;
>         for (Callback callback : callbacks) {
>             if (callback instanceof NameCallback)
>                 username = ((NameCallback) callback).getDefaultName();
>             else if (callback instanceof ScramCredentialCallback)
>                 ((ScramCredentialCallback) callback).scramCredential(credentialCache.get(username));
> {code}
> Since ConcurrentHashMap, used by CredentialCache, doesn't allow null keys, we should
check that username is not null before calling credentialCache.get()



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message