[
https://issues.apache.org/jira/browse/KNOX-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16694942#comment-16694942
]
Kevin Risden commented on KNOX-1619:
------------------------------------
I think the easiest way is to check in the decrypt method if split ends up with
an array of size 3. If not then throw illegalargumentexception for the data
that came in. This way we don't try to do something with invalid data.
As far as preventing bad data, it looks like there might be a race condition on
the listener. We should make sure we are creating/writing data in one step.
This is assuming the data coming in is a blank byte array.
> RemoteAliasService#entryChanged ArrayIndexOutOfBoundsException
> --------------------------------------------------------------
>
> Key: KNOX-1619
> URL: https://issues.apache.org/jira/browse/KNOX-1619
> Project: Apache Knox
> Issue Type: Bug
> Reporter: Kevin Risden
> Priority: Major
> Fix For: 1.3.0
>
>
> {noformat}
> 2018-11-20 22:27:43,222 ERROR knox.gateway
> (RemoteAliasService.java:entryChanged(685)) - Error adding alias
> encryptquerystring for cluster TOPOLOGY_NAME locally (local keystore), cause:
> java.lang.ArrayIndexOutOfBoundsException: 1 {noformat}
> Talked with [~pzampino] and he suggested this could come from the
> RemoteAliasService#decrypt method. Since the exception is caught and the
> comment says "log and move on", it doesn't seem to be a big deal. We should
> try to make this nicer :)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)