ThePrez opened a new pull request #5216:
URL: https://github.com/apache/camel/pull/5216


   
   
   Current username/password parsing in the jt400 has two very minor bugs. Both 
should be fixed with a simple one-line change. 
   
   **Bug 1: using an empty password results in an exception**
   An empty password is allowed when the username is `*CURRENT`. However, 
specifying `*CURRENT:` as the `uid:pwd` string results in an exception
   ```pascal
   Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of 
range: 1
       at org.apache.camel.component.jt400.Jt400Configuration.<init> 
(Jt400Configuration.java:130)
       at org.apache.camel.component.jt400.Jt400Endpoint.<init> 
(Jt400Endpoint.java:68)
       at org.apache.camel.component.jt400.Jt400Component.createEndpoint 
(Jt400Component.java:77)
       at org.apache.camel.support.DefaultComponent.createEndpoint 
(DefaultComponent.java:237)
       at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint 
(AbstractCamelContext.java:846)
       at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint 
(AbstractCamelContext.java:768)
       at org.apache.camel.support.CamelContextHelper.resolveEndpoint 
(CamelContextHelper.java:123)
   ```
   
   **Bug 2: passwords are allowed to have colons**
   If my password has a colon (for instance, `pass:word`), then it is not 
parsed properly. It will parse the password as just `pass` rather than the full 
`pass:word`


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


Reply via email to