I think a possible workaround while we figure out how to fix it is to provide two RAW functions wrapping the ) character:
RAW(41))RAW(&fail) You may give it a try. Pasquale. On Wed, Jul 21, 2021 at 5:10 PM Pasquale Congiusti < pasquale.congiu...@gmail.com> wrote: > Ah, I see. The problem is how we can escape the ")" character, as this is > interpreted as closing the RAW function. > > I think it may be even a bug with some greedy regular expression problem. > I've opened a Jira issue to track the problem [1], we'll be working on the > fix soon unless there is already any escape character available (I tried > the classic \ with no success). > > [1] https://issues.apache.org/jira/browse/CAMEL-16813 > > Pasquale. > > On Wed, Jul 21, 2021 at 1:24 PM EIBL Florian (ICS460-BAI) < > florian.e...@spar-ics.com> wrote: > >> Hi, >> >> thanks for your recommendation, but it does not work. >> >> I tried to URL encode the password: 41%29%26fail >> >> With the encoded password, I do not get the “Failed to resolve endpoint” >> error below, but the password is wrong when connecting to the server. >> It seems that the password is not URL decoded before it is used by the >> Camel SftpConsumer and hence it is wrong. >> >> Any ideas? >> >> >> Thx and regards, >> Flo >> >> Von: Pasquale Congiusti <pasquale.congiu...@gmail.com> >> Gesendet: Freitag, 16. Juli 2021 16:37 >> An: users@camel.apache.org >> Betreff: {EXT} Re: SFTP component possible bug with URL parameter >> including char sequence “)&” >> >> Hi there, >> you can try to urlencode the problematic characters and see if it solves. >> >> Pasquale. >> >> On Fri, Jul 16, 2021 at 12:39 PM EIBL Florian (ICS460-BAI) < >> florian.e...@spar-ics.com<mailto:florian.e...@spar-ics.com>> wrote: >> Hello, >> >> I‘m using Camel v3.10.0 and openjdk 14.0.1 >> >> Camel has a problem building this route: >> >> >> <https://www.spar-ics.com/> >> >> Florian EIBL >> Software Engineer >> Business Automation & Integration >> Phone: >> +43 664 6259733 >> Mobile: >> +43 664 6259733 >> E-Mail: >> florian.e...@spar-ics.com<mailto:florian.e...@spar-ics.com> >> >> SPAR Business Services GmbH >> Information & Communication Services >> Europastrasse 3, 5015 Salzburg, Austria >> >> >> ____________________________________________________________________________________________________ >> >> from("sftp:testserver/../testdir/" + >> "?password=RAW(41)&fail)") >> .log("${body}"); >> >> ____________________________________________________________________________________________________ >> >> It seems that parsing the endpoint URL is a problem, if there is the char >> sequence “)&” in the password. It does not help to use RAW() syntax for >> the password (moreover Camel does it anyway). >> The chars following “)&” are interpreted as a new URL parameter -> “Check >> the uri if the parameters are spelt correctly and that they are properties >> of the endpoint. Unknown parameters=[{fail=}]” >> >> Here the complete stacktrace: >> >> StackTrace: >> org.apache.camel.FailedToCreateRouteException: Failed to create route >> route1: Route(route1)[From[sftp:testserver/../testdir/?password=xxxx... >> because of Failed to resolve endpoint: >> sftp://testserver/../testdir/?fail%29=&password=xxxxxx due to: Failed to >> resolve endpoint: sftp://testserver/../testdir/?fail%29=&password=xxxxxx >> due to: There are 1 parameters that couldn't be set on the endpoint. Check >> the uri if the parameters are spelt correctly and that they are properties >> of the endpoint. Unknown parameters=[{fail)=}] >> at >> org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:80) >> ~[camel-core-reifier-3.10.0.jar:3.10.0] >> at >> org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49) >> ~[camel-core-engine-3.10.0.jar:3.10.0] >> at >> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:826) >> ~[camel-core-engine-3.10.0.jar:3.10.0] >> at >> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:716) >> ~[camel-core-engine-3.10.0.jar:3.10.0] >> at >> org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2756) >> ~[camel-base-engine-3.10.0.jar:3.10.0] >> at >> org.apache.camel.support.service.BaseService.init(BaseService.java:83) >> ~[camel-api-3.10.0.jar:3.10.0] >> at >> org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2475) >> ~[camel-base-engine-3.10.0.jar:3.10.0] >> at >> org.apache.camel.support.service.BaseService.start(BaseService.java:111) >> ~[camel-api-3.10.0.jar:3.10.0] >> at >> org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2494) >> ~[camel-base-engine-3.10.0.jar:3.10.0] >> at >> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:245) >> ~[camel-core-engine-3.10.0.jar:3.10.0] >> at >> org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:107) >> ~[camel-spring-3.10.0.jar:3.10.0] >> at >> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:139) >> ~[camel-spring-3.10.0.jar:3.10.0] >> at >> org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) >> ~[spring-context-5.3.2.jar:5.3.2] >> at >> org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) >> ~[spring-context-5.3.2.jar:5.3.2] >> at >> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) >> ~[spring-context-5.3.2.jar:5.3.2] >> at >> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:426) >> ~[spring-context-5.3.2.jar:5.3.2] >> at >> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383) >> ~[spring-context-5.3.2.jar:5.3.2] >> at >> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:943) >> ~[spring-context-5.3.2.jar:5.3.2] >> at >> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591) >> ~[spring-context-5.3.2.jar:5.3.2] >> at >> org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) >> ~[spring-boot-2.4.1.jar:2.4.1] >> at >> org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) >> ~[spring-boot-2.4.1.jar:2.4.1] >> at >> org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) >> ~[spring-boot-2.4.1.jar:2.4.1] >> at >> org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) >> ~[spring-boot-2.4.1.jar:2.4.1] >> at >> org.springframework.boot.SpringApplication.run(SpringApplication.java:326) >> ~[spring-boot-2.4.1.jar:2.4.1] >> at >> org.springframework.boot.SpringApplication.run(SpringApplication.java:1309) >> ~[spring-boot-2.4.1.jar:2.4.1] >> at >> org.springframework.boot.SpringApplication.run(SpringApplication.java:1298) >> ~[spring-boot-2.4.1.jar:2.4.1] >> at >> com.spar_ics.eai.apps.routes.idm_scim_service.IdmScimServiceApplication.main(IdmScimServiceApplication.java:13) >> ~[classes/:na] >> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to >> resolve endpoint: sftp://testserver/../testdir/?fail%29=&password=xxxxxx >> due to: Failed to resolve endpoint: >> sftp://testserver/../testdir/?fail%29=&password=xxxxxx due to: There are 1 >> parameters that couldn't be set on the endpoint. Check the uri if the >> parameters are spelt correctly and that they are properties of the >> endpoint. Unknown parameters=[{fail)=}] >> at >> org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:962) >> ~[camel-base-engine-3.10.0.jar:3.10.0] >> at >> org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:844) >> ~[camel-base-engine-3.10.0.jar:3.10.0] >> at >> org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58) >> ~[camel-support-3.10.0.jar:3.10.0] >> at >> org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:177) >> ~[camel-core-reifier-3.10.0.jar:3.10.0] >> at >> org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:94) >> ~[camel-core-reifier-3.10.0.jar:3.10.0] >> at >> org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74) >> ~[camel-core-reifier-3.10.0.jar:3.10.0] >> ... 26 common frames omitted >> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to >> resolve endpoint: sftp://testserver/../testdir/?fail%29=&password=xxxxxx >> due to: There are 1 parameters that couldn't be set on the endpoint. Check >> the uri if the parameters are spelt correctly and that they are properties >> of the endpoint. Unknown parameters=[{fail)=}] >> at >> org.apache.camel.support.DefaultComponent.validateParameters(DefaultComponent.java:299) >> ~[camel-support-3.10.0.jar:3.10.0] >> at >> org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:192) >> ~[camel-support-3.10.0.jar:3.10.0] >> at >> org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:928) >> ~[camel-base-engine-3.10.0.jar:3.10.0] >> ... 31 common frames omitted >> >> >> >> Thx and regards, >> Flo >> Sollten Sie diese E-Mail unbeabsichtigt bzw. irrtümlich erhalten haben, >> so weisen wir Sie darauf hin, dass gemäß § 93 Abs 4 TKG der Inhalt sowie >> die Tatsache des Empfangs dieser E-Mail weder aufgezeichnet noch verwertet >> oder Unbefugten mitgeteilt werden dürfen. Wir ersuchen Sie, die Nachricht >> von Ihrem System zu löschen und sich mit uns in Verbindung zu setzen. If >> you have received this email accidentally or in error, we point out that, >> in accordance with § 93 para. 4 TKG (Telecommunications Act), the contents >> of this email and the fact of its receipt must not be recorded, exploited >> or communicated to unauthorized persons. We ask you to delete the message >> from your system and to contact us. >> >