On Thu, Sep 13, 2012 at 10:28 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > I added an unit test using your username and password which have special signs > http://svn.apache.org/viewvc?rev=1384228&view=rev > > This works fine. I change the logging in the ftp login code from trace > to info level to see the password being used > > 2012-09-13 10:25:56,324 [//src/main/data] INFO FtpOperations > - Attempting to login user: us@r using password: t%st > 2012-09-13 10:25:56,351 [//src/main/data] INFO RemoteFileProducer > - Connected and logged in to: > Endpoint[ftp://localhost:21000/tmp3/camel?consumer.initialDelay=3000&password=******&username=us%40r] > > The only issue I could find is if you specify the username in the > authority part of the url, eg in the beginning > ftp://us@r@localhost:21/somepath > > eg the double @ fools Camel. That should be fixeable though. >
Well essentially you would need to percent encode the @ in the username to have a valid url. And also user info is only available if you have both username *and* password separated by colon. So it should be: ftp://us%40r:t%st@localhost:21/somepath And the % can be percent encoded as well ftp://us%40r:t%25st@localhost:21/somepath Now we could consider supporting an easier approach if the user has @ in the user info, in either username or password. Its a bit more tricky though, as we would need to detect this, and encode the @ so the URI from the JDK can parse the user info. ftp://us@r:t%st@localhost:21/somepath > But the encoding of the password worked fine when using the url as > return "ftp://localhost:" + getPort() + > "/tmp3/camel?username=us@r&password=t%25st&consumer.initialDelay=3000"; > > The @ gets encoded to %40, and the password is masked when being > logged (eg the ****) > , but that would be encoded as (from debugging) > ftp://localhost:21000/tmp3/camel?consumer.initialDelay=3000&password=t%25st&username=us%40r > > > > > > > On Wed, Sep 12, 2012 at 8:51 AM, Marco Crivellaro <marco.cr...@gmail.com> > wrote: >> Thanks for letting me know. >> The ticket doesn't have any target milestone, is there a short term plan to >> work on this issue? >> Othewise I suppose the only way out for me would be to roll back to last >> 2.8.x... >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Issues-with-URI-containing-40-or-26-tp5719118p5719165.html >> Sent from the Camel - Users mailing list archive at Nabble.com. > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cib...@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus, fusenews > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen