[
https://issues.apache.org/jira/browse/CAMEL-16813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17387065#comment-17387065
]
Tadayoshi Sato edited comment on CAMEL-16813 at 7/26/21, 5:38 AM:
------------------------------------------------------------------
[~squakez] As I sent to the user ML, I don't think this is a bug. If you use
RAW(...) and ")&" in the middle like:
{code:java}
?password=RAW(41)&fail)
{code}
there should be no way to syntactically parse the query uniquely. Parsing it as
a single "password" key with value "41)&fail" is a valid way, but also parsing
it as two params of password = "41" and no value key "fail)" can be valid.
Let's see another example. How do we parse this query?
{code:java}
?param1=RAW(abc)¶m2=RAW(def)
{code}
Is it param1 = "abc)¶m2=RAW(def)" or param1 = "abc" and param2 = "def"?
With CAMEL-12982 what we provide for such a case as using a password containing
")&" is to use RAW
{...}
instead of RAW(...).
{code:java}
?password=RAW{41)&fail}
{code}
For more detail on RAW() vs RAW{} I wrote an explanation here:
https://issues.apache.org/jira/browse/CAMEL-12982?focusedCommentId=16744700&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16744700
was (Author: tadayosi):
[~squakez] As I sent to the user ML, I don't think this is a bug. If you use
RAW(...) and ")&" in the middle like your case:
{code}
?password=RAW(41)&fail)
{code}
there should be no way to syntactically parse the query uniquely. Parsing it as
a single "password" key with value "41)&fail" is a valid way, but also parsing
it as two params of password = "41" and no value key "fail)" can be valid.
Let's see another example. How do we parse this query?
{code}
?param1=RAW(abc)¶m2=RAW(def)
{code}
Is it param1 = "abc)¶m2=RAW(def)" or param1 = "abc" and param2 = "def"?
With CAMEL-12982 what we provide for such a case as using a password containing
")&" is to use RAW{...} instead of RAW(...).
{code}
?password=RAW{41)&fail}
{code}
For more detail on RAW() vs RAW{} I wrote an explanation here:
https://issues.apache.org/jira/browse/CAMEL-12982?focusedCommentId=16744700&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16744700
> RAW function - escape ) character
> ---------------------------------
>
> Key: CAMEL-16813
> URL: https://issues.apache.org/jira/browse/CAMEL-16813
> Project: Camel
> Issue Type: Bug
> Affects Versions: 3.10.0
> Reporter: Pasquale Congiusti
> Priority: Major
>
> We've been reported a possible bug when using the RAW function including a )
> character. This is interpreted as closing the RAW function, though it may be
> part of the argument.
> As an example:
> {code}
> from("sftp:testserver/../testdir/?password=RAW(se+re?t)&23)")
> {code}
> Will fail as the function will take only *se+re?t* as an argument. I wonder
> if there is any escape character and if not, I think it makes sense to
> include all the text until the last ) character.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)