[
https://issues.apache.org/jira/browse/CAMEL-26169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-26169.
---------------------------------
Resolution: Fixed
Fixed by https://github.com/apache/camel/pull/28945 (merged to main as
180eebf592c7197b8d7c1507d902c8a245498b6d).
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> camel-sap-netweaver - an endpoint url that already has a query string gets a
> second ? added
> -------------------------------------------------------------------------------------------
>
> Key: CAMEL-26169
> URL: https://issues.apache.org/jira/browse/CAMEL-26169
> Project: Camel
> Issue Type: Bug
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while adding the catalog body types of sap-netweaver (CAMEL-24961, PR
> #28412).
> h4. 1. An endpoint url that already has a query string gets a second ?
> {{NetWeaverProducer.doStart}} (main 2a465aa4814c, line 81) builds the http
> endpoint uri as {{getUrl() + "?authUsername=" + ...}}, always with a {{?}}.
> When the configured url already has query parameters, the result has two
> {{?}} and the http endpoint gets a wrong uri. Read in the code, not run.
> Proposed: append the parameters with {{&}} when the url already contains
> {{?}} (for example with {{URISupport.appendParametersToURI}}).
> h4. 2. A password with & or + fails
> {{NetWeaverProducer}} (main 2a465aa4814c, line 81) builds the http endpoint
> URI as {{url + "?authUsername=" + username + "&authPassword=" + password}},
> without {{RAW()}} or encoding. A password with {{&}} is cut there (with
> {{RAW(a&b=c)}} the server got the Basic credentials {{u:a}}, and {{b=c}} in
> the request query), and a {{+}} becomes a space. Checked on 4.24.0-SNAPSHOT
> with a local HTTP server.
> Proposed: wrap the values in {{RAW()}}, or set the auth options on the http
> endpoint instead of building them into the URI.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)