[jira] [Commented] (OLINGO-1107) UriDecoder should use java.net.URLDecoder

2020-09-10 Thread Maciej (Jira)


[ 
https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17193604#comment-17193604
 ] 

Maciej  commented on OLINGO-1107:
-

I raise the above question.

Will the fix be ported to V2 implementation?

> UriDecoder should use java.net.URLDecoder
> -
>
> Key: OLINGO-1107
> URL: https://issues.apache.org/jira/browse/OLINGO-1107
> Project: Olingo
>  Issue Type: Bug
>  Components: odata4-server
>Affects Versions: (Java) V4 4.3.0
>Reporter: Jon McEwen
>Assignee: Ramesh Reddy
>Priority: Major
> Fix For: (Java) V4 4.4.0
>
>
> Query filters are incorrectly parsed, because the 
> org.apache.olingo.commons.core.Decoder doesn't convert '+' to space.
> Simple fix is to use java.net.URLDecoder instead (line 85):
> {{return URLDecoder.decode(encoded, "UTF-8");}}
> Additional unit test:
> {code:Java}
>   @Test
>   public void decodePlusAsSpace() throws Exception{
> checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", 
> "PaymentStatus eq 'Cleared'");
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OLINGO-1107) UriDecoder should use java.net.URLDecoder

2020-03-30 Thread Technical Nishant (Jira)


[ 
https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17071029#comment-17071029
 ] 

Technical Nishant commented on OLINGO-1107:
---

Is the URL with '+' in case of sending Space handled in V2 also. We are on 
2.0.11 Olingo.

 

We are facing an issue with creating a filter expression for batch , where the 
batch request  contains a filter expression with space encoded as '+' . When we 
change this encoding to %20 the filter works. Meaning it can tokenize the 
operands and forma filter expression. 

 

Sample request With '+' Encoding

--Batch_1584556492344

Content-Type: application/http

Content-Transfer-Encoding: binary

 

GET 
TransfersCollection?$filter=((SelectedAccounts+eq+%27081699%27))&$format=json 
HTTP/1.1

 Response : 

-

--batch_37a39045-879f-45a5-811e-fed5b48126c5

Content-Type: application/http

Content-Transfer-Encoding: binary

 

HTTP/1.1 400 Bad Request

DataServiceVersion: 1.0

Content-Type: application/json

Content-Length: 120

 

{"error":\{"code":null,"message":{"lang":"en","value":"Invalid filter 
expression: '((SelectedAccounts+eq+'081699'))'."}}}

--batch_37a39045-879f-45a5-811e-fed5b48126c5--

 

 

 

--Batch_1584556492344--

Sample request With '%20' Encoding

--Batch_1584556492344

Content-Type: application/http

Content-Transfer-Encoding: binary

 

GET 
TransfersCollection?$filter=((SelectedAccounts%20eq%20%27081699%27))&$format=json
 HTTP/1.1

 

 

--Batch_1584556492344--

 

 Response is 202 with valid json response.

 

 

 

> UriDecoder should use java.net.URLDecoder
> -
>
> Key: OLINGO-1107
> URL: https://issues.apache.org/jira/browse/OLINGO-1107
> Project: Olingo
>  Issue Type: Bug
>  Components: odata4-server
>Affects Versions: (Java) V4 4.3.0
>Reporter: Jon McEwen
>Assignee: Ramesh Reddy
>Priority: Major
> Fix For: (Java) V4 4.4.0
>
>
> Query filters are incorrectly parsed, because the 
> org.apache.olingo.commons.core.Decoder doesn't convert '+' to space.
> Simple fix is to use java.net.URLDecoder instead (line 85):
> {{return URLDecoder.decode(encoded, "UTF-8");}}
> Additional unit test:
> {code:Java}
>   @Test
>   public void decodePlusAsSpace() throws Exception{
> checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", 
> "PaymentStatus eq 'Cleared'");
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OLINGO-1107) UriDecoder should use java.net.URLDecoder

2017-04-13 Thread Ramesh Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15968072#comment-15968072
 ] 

Ramesh Reddy commented on OLINGO-1107:
--

[~mirbo] This always in encoding side, as long as decoding side can handle both 
+ and %20 we will be fine. We know that %20 is already handled in server, +  
may not be handled as noted as in OLINGO-752 for possible issues. In this 
particular issue client may be inadvertently passing + instead of %20, which 
will be corrected with the patch 

> UriDecoder should use java.net.URLDecoder
> -
>
> Key: OLINGO-1107
> URL: https://issues.apache.org/jira/browse/OLINGO-1107
> Project: Olingo
>  Issue Type: Bug
>  Components: odata4-server
>Affects Versions: (Java) V4 4.3.0
>Reporter: Jon McEwen
>
> Query filters are incorrectly parsed, because the 
> org.apache.olingo.commons.core.Decoder doesn't convert '+' to space.
> Simple fix is to use java.net.URLDecoder instead (line 85):
> {{return URLDecoder.decode(encoded, "UTF-8");}}
> Additional unit test:
> {code:Java}
>   @Test
>   public void decodePlusAsSpace() throws Exception{
> checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", 
> "PaymentStatus eq 'Cleared'");
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OLINGO-1107) UriDecoder should use java.net.URLDecoder

2017-04-13 Thread Michael Bolz (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15968058#comment-15968058
 ] 

Michael Bolz commented on OLINGO-1107:
--

Hi,

as long the relaxation only affects the client it is fine for me.
As far as I understand the change, afterwards the client can handle {{+}} as 
empty space
and for the server the behaviour will not be changed, right?

Best Regards, Michael

> UriDecoder should use java.net.URLDecoder
> -
>
> Key: OLINGO-1107
> URL: https://issues.apache.org/jira/browse/OLINGO-1107
> Project: Olingo
>  Issue Type: Bug
>  Components: odata4-server
>Affects Versions: (Java) V4 4.3.0
>Reporter: Jon McEwen
>
> Query filters are incorrectly parsed, because the 
> org.apache.olingo.commons.core.Decoder doesn't convert '+' to space.
> Simple fix is to use java.net.URLDecoder instead (line 85):
> {{return URLDecoder.decode(encoded, "UTF-8");}}
> Additional unit test:
> {code:Java}
>   @Test
>   public void decodePlusAsSpace() throws Exception{
> checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", 
> "PaymentStatus eq 'Cleared'");
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OLINGO-1107) UriDecoder should use java.net.URLDecoder

2017-04-13 Thread Ramesh Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967821#comment-15967821
 ] 

Ramesh Reddy commented on OLINGO-1107:
--

[~chrisam] or [~mibo] are you guys OK if we changes this to 
https://github.com/rareddy/olingo-odata4/commit/41038bf162173d9a7d9044061a164314e3fc2861

> UriDecoder should use java.net.URLDecoder
> -
>
> Key: OLINGO-1107
> URL: https://issues.apache.org/jira/browse/OLINGO-1107
> Project: Olingo
>  Issue Type: Bug
>  Components: odata4-server
>Affects Versions: (Java) V4 4.3.0
>Reporter: Jon McEwen
>
> Query filters are incorrectly parsed, because the 
> org.apache.olingo.commons.core.Decoder doesn't convert '+' to space.
> Simple fix is to use java.net.URLDecoder instead (line 85):
> {{return URLDecoder.decode(encoded, "UTF-8");}}
> Additional unit test:
> {code:Java}
>   @Test
>   public void decodePlusAsSpace() throws Exception{
> checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", 
> "PaymentStatus eq 'Cleared'");
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OLINGO-1107) UriDecoder should use java.net.URLDecoder

2017-04-13 Thread Ramesh Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967712#comment-15967712
 ] 

Ramesh Reddy commented on OLINGO-1107:
--

Ah! That seems legitimate :) 

> UriDecoder should use java.net.URLDecoder
> -
>
> Key: OLINGO-1107
> URL: https://issues.apache.org/jira/browse/OLINGO-1107
> Project: Olingo
>  Issue Type: Bug
>  Components: odata4-server
>Affects Versions: (Java) V4 4.3.0
>Reporter: Jon McEwen
>
> Query filters are incorrectly parsed, because the 
> org.apache.olingo.commons.core.Decoder doesn't convert '+' to space.
> Simple fix is to use java.net.URLDecoder instead (line 85):
> {{return URLDecoder.decode(encoded, "UTF-8");}}
> Additional unit test:
> {code:Java}
>   @Test
>   public void decodePlusAsSpace() throws Exception{
> checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", 
> "PaymentStatus eq 'Cleared'");
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OLINGO-1107) UriDecoder should use java.net.URLDecoder

2017-04-13 Thread Jon McEwen (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967706#comment-15967706
 ] 

Jon McEwen commented on OLINGO-1107:


In that case, the bug is in the client:

https://github.com/apache/olingo-odata4/blob/8515b48dd5e09e4597d0b396326bd6a074efa1f5/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java#L27

> UriDecoder should use java.net.URLDecoder
> -
>
> Key: OLINGO-1107
> URL: https://issues.apache.org/jira/browse/OLINGO-1107
> Project: Olingo
>  Issue Type: Bug
>  Components: odata4-server
>Affects Versions: (Java) V4 4.3.0
>Reporter: Jon McEwen
>
> Query filters are incorrectly parsed, because the 
> org.apache.olingo.commons.core.Decoder doesn't convert '+' to space.
> Simple fix is to use java.net.URLDecoder instead (line 85):
> {{return URLDecoder.decode(encoded, "UTF-8");}}
> Additional unit test:
> {code:Java}
>   @Test
>   public void decodePlusAsSpace() throws Exception{
> checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", 
> "PaymentStatus eq 'Cleared'");
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OLINGO-1107) UriDecoder should use java.net.URLDecoder

2017-04-12 Thread Ramesh Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15966119#comment-15966119
 ] 

Ramesh Reddy commented on OLINGO-1107:
--

I believe this has been debated before, although it would be nice to have 
relaxed support for "+" but %20 representation is correct form according to 
[1].  Olingo is known to be very strict in parsing rules [2], which IMO could 
use little more relaxation in terms of client issued urls. So, this is not a 
bug, but by design.

[1] 
http://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20
[2] 
http://markmail.org/search/?q=list%3Aorg.apache.olingo.user+space#query:list%3Aorg.apache.olingo.user%20space+page:1+mid:ukiihmxuyqvunxat+state:results

> UriDecoder should use java.net.URLDecoder
> -
>
> Key: OLINGO-1107
> URL: https://issues.apache.org/jira/browse/OLINGO-1107
> Project: Olingo
>  Issue Type: Bug
>  Components: odata4-server
>Affects Versions: (Java) V4 4.3.0
>Reporter: Jon McEwen
>
> Query filters are incorrectly parsed, because the 
> org.apache.olingo.commons.core.Decoder doesn't convert '+' to space.
> Simple fix is to use java.net.URLDecoder instead (line 85):
> {{return URLDecoder.decode(encoded, "UTF-8");}}
> Additional unit test:
> {code:Java}
>   @Test
>   public void decodePlusAsSpace() throws Exception{
> checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", 
> "PaymentStatus eq 'Cleared'");
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)