epugh commented on PR #1954:
URL: https://github.com/apache/solr/pull/1954#issuecomment-1735521281

   > re. this pattern of parsing `user:password`
   > 
   > ```
   > if (credentials != null && credentials.indexOf(":") > 0) {
   >       String[] credentialsArray = credentials.split(":");
   > ```
   > 
   > what happens if the password itself contains `:` (I don't think the 
username is allowed to but I may be wrong). would it be a safer bet to break 
the string in 2 parts on the first occurrence?
   > 
   > [edit] turns out the solution to this was very simple, use 
`credentials.split(":",2)`. this will force the split into 2 parts only.
   
   your fix is nicer than mine!


-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to