[jira] [Commented] (OFBIZ-10569) Wrong handling of response type "cross-redirect"

2018-10-09 Thread Dennis Balkir (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16642956#comment-16642956
 ] 

Dennis Balkir commented on OFBIZ-10569:
---

Hi Jacques,

yes please create another issue for this.

This will be a great feature to have and we can use the patch I made with 
slight modifications as a starting point, since the modified code already 
provides the feature.
We just have to change it up a bit, to make it a new type

> Wrong handling of response type "cross-redirect"
> 
>
> Key: OFBIZ-10569
> URL: https://issues.apache.org/jira/browse/OFBIZ-10569
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework
>Reporter: Dennis Balkir
>Assignee: Jacques Le Roux
>Priority: Minor
> Fix For: 17.12.01, 16.11.06
>
> Attachments: OFBIZ-10569_RequestHandler.patch
>
>
> When using the response type "cross-redirect", OFBiz is not acting as 
> expected.
> The description of the types "url" and "cross-redirect" is stated as follows 
> in the file {{site-conf.xsd}}:
> {code:xml}
> 
>   
> 
>   Any URL, relative or absolute. Redirected parameters are not used, you 
> can put them in the url.
> 
>   
> 
> 
>   
> 
>   Works like URL but you can also pass redirected parameters.
> 
>   
> 
> {code}
> The way, this is implemented in {{RequestHandler.java}} works slightly 
> different:
> For the type "url", this is true, but for "cross-redirect", before putting 
> the params in the link, it is checked, if the link begins with an "/".
> If not, it is added as the first char.
> This results in a link given like this: {{https://test.com}}
> will turn into this: {{/https://test.com}}, which will then be treated as an 
> OFBiz internal link, like {{/catalog}}, and instead of be called externally, 
> OFBiz tries to call it as an OFBiz-URL.
> This behavior is not correct and should therefore be corrected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10569) Wrong handling of response type "cross-redirect"

2018-10-09 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16642952#comment-16642952
 ] 

Jacques Le Roux commented on OFBIZ-10569:
-

I have created OFBIZ-10599 for that

> Wrong handling of response type "cross-redirect"
> 
>
> Key: OFBIZ-10569
> URL: https://issues.apache.org/jira/browse/OFBIZ-10569
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework
>Reporter: Dennis Balkir
>Assignee: Jacques Le Roux
>Priority: Minor
> Fix For: 17.12.01, 16.11.06
>
> Attachments: OFBIZ-10569_RequestHandler.patch
>
>
> When using the response type "cross-redirect", OFBiz is not acting as 
> expected.
> The description of the types "url" and "cross-redirect" is stated as follows 
> in the file {{site-conf.xsd}}:
> {code:xml}
> 
>   
> 
>   Any URL, relative or absolute. Redirected parameters are not used, you 
> can put them in the url.
> 
>   
> 
> 
>   
> 
>   Works like URL but you can also pass redirected parameters.
> 
>   
> 
> {code}
> The way, this is implemented in {{RequestHandler.java}} works slightly 
> different:
> For the type "url", this is true, but for "cross-redirect", before putting 
> the params in the link, it is checked, if the link begins with an "/".
> If not, it is added as the first char.
> This results in a link given like this: {{https://test.com}}
> will turn into this: {{/https://test.com}}, which will then be treated as an 
> OFBiz internal link, like {{/catalog}}, and instead of be called externally, 
> OFBiz tries to call it as an OFBiz-URL.
> This behavior is not correct and should therefore be corrected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10569) Wrong handling of response type "cross-redirect"

2018-10-03 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16636591#comment-16636591
 ] 

Jacques Le Roux commented on OFBIZ-10569:
-

HI Dennis,

Will you handle it?

> Wrong handling of response type "cross-redirect"
> 
>
> Key: OFBIZ-10569
> URL: https://issues.apache.org/jira/browse/OFBIZ-10569
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework
>Reporter: Dennis Balkir
>Priority: Minor
> Attachments: OFBIZ-10569_RequestHandler.patch
>
>
> When using the response type "cross-redirect", OFBiz is not acting as 
> expected.
> The description of the types "url" and "cross-redirect" is stated as follows 
> in the file {{site-conf.xsd}}:
> {code:xml}
> 
>   
> 
>   Any URL, relative or absolute. Redirected parameters are not used, you 
> can put them in the url.
> 
>   
> 
> 
>   
> 
>   Works like URL but you can also pass redirected parameters.
> 
>   
> 
> {code}
> The way, this is implemented in {{RequestHandler.java}} works slightly 
> different:
> For the type "url", this is true, but for "cross-redirect", before putting 
> the params in the link, it is checked, if the link begins with an "/".
> If not, it is added as the first char.
> This results in a link given like this: {{https://test.com}}
> will turn into this: {{/https://test.com}}, which will then be treated as an 
> OFBiz internal link, like {{/catalog}}, and instead of be called externally, 
> OFBiz tries to call it as an OFBiz-URL.
> This behavior is not correct and should therefore be corrected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10569) Wrong handling of response type "cross-redirect"

2018-09-20 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16621726#comment-16621726
 ] 

Jacques Le Roux commented on OFBIZ-10569:
-

Hi Dennis,

bq. Yes, the documentation said that, but I don't actually get how this should 
work with params, that need to be variable..
Right, it's only with fixed params in the URL

bq. Maybe this issue could be changed accordingly?
Sounds like a plan, thanks!

> Wrong handling of response type "cross-redirect"
> 
>
> Key: OFBIZ-10569
> URL: https://issues.apache.org/jira/browse/OFBIZ-10569
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework
>Reporter: Dennis Balkir
>Priority: Minor
> Attachments: OFBIZ-10569_RequestHandler.patch
>
>
> When using the response type "cross-redirect", OFBiz is not acting as 
> expected.
> The description of the types "url" and "cross-redirect" is stated as follows 
> in the file {{site-conf.xsd}}:
> {code:xml}
> 
>   
> 
>   Any URL, relative or absolute. Redirected parameters are not used, you 
> can put them in the url.
> 
>   
> 
> 
>   
> 
>   Works like URL but you can also pass redirected parameters.
> 
>   
> 
> {code}
> The way, this is implemented in {{RequestHandler.java}} works slightly 
> different:
> For the type "url", this is true, but for "cross-redirect", before putting 
> the params in the link, it is checked, if the link begins with an "/".
> If not, it is added as the first char.
> This results in a link given like this: {{https://test.com}}
> will turn into this: {{/https://test.com}}, which will then be treated as an 
> OFBiz internal link, like {{/catalog}}, and instead of be called externally, 
> OFBiz tries to call it as an OFBiz-URL.
> This behavior is not correct and should therefore be corrected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10569) Wrong handling of response type "cross-redirect"

2018-09-20 Thread Dennis Balkir (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16621717#comment-16621717
 ] 

Dennis Balkir commented on OFBIZ-10569:
---

Hi Jacques,
{quote}You can with "url", but, as it's documented in site-conf.xsd, only using 
params in the URL
{quote}
Yes, the documentation said that, but I don't actually get how this should work 
with params, that need to be variable..
{quote}I'll be more for a new type ("url-redirect"?) and amend the 
documentation. It's possible that users are using "cross-redirect" w/o 
following the xsd docupentation
{quote}
This would be a good solution imo

Maybe this issue could be changed accordingly?

> Wrong handling of response type "cross-redirect"
> 
>
> Key: OFBIZ-10569
> URL: https://issues.apache.org/jira/browse/OFBIZ-10569
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework
>Reporter: Dennis Balkir
>Priority: Minor
> Attachments: OFBIZ-10569_RequestHandler.patch
>
>
> When using the response type "cross-redirect", OFBiz is not acting as 
> expected.
> The description of the types "url" and "cross-redirect" is stated as follows 
> in the file {{site-conf.xsd}}:
> {code:xml}
> 
>   
> 
>   Any URL, relative or absolute. Redirected parameters are not used, you 
> can put them in the url.
> 
>   
> 
> 
>   
> 
>   Works like URL but you can also pass redirected parameters.
> 
>   
> 
> {code}
> The way, this is implemented in {{RequestHandler.java}} works slightly 
> different:
> For the type "url", this is true, but for "cross-redirect", before putting 
> the params in the link, it is checked, if the link begins with an "/".
> If not, it is added as the first char.
> This results in a link given like this: {{https://test.com}}
> will turn into this: {{/https://test.com}}, which will then be treated as an 
> OFBiz internal link, like {{/catalog}}, and instead of be called externally, 
> OFBiz tries to call it as an OFBiz-URL.
> This behavior is not correct and should therefore be corrected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10569) Wrong handling of response type "cross-redirect"

2018-09-20 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16621714#comment-16621714
 ] 

Jacques Le Roux commented on OFBIZ-10569:
-

Hi Dennis,

bq. But on the other hand, this means, that there simply is no possibility to 
address an external url with params, which would be quite restrictive.
You can with "url", but, as it's documented in site-conf.xsd, only using params 
in the URL

bq. Since there are already different ways to open an internal url with params, 
why not use this, or maybe make a new type, for external url with params?
I'll be more for a new type ("url-redirect"?) and amend the documentation. It's 
possible that users are using "cross-redirect" w/o following the xsd 
docupentation


> Wrong handling of response type "cross-redirect"
> 
>
> Key: OFBIZ-10569
> URL: https://issues.apache.org/jira/browse/OFBIZ-10569
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework
>Reporter: Dennis Balkir
>Priority: Minor
> Attachments: OFBIZ-10569_RequestHandler.patch
>
>
> When using the response type "cross-redirect", OFBiz is not acting as 
> expected.
> The description of the types "url" and "cross-redirect" is stated as follows 
> in the file {{site-conf.xsd}}:
> {code:xml}
> 
>   
> 
>   Any URL, relative or absolute. Redirected parameters are not used, you 
> can put them in the url.
> 
>   
> 
> 
>   
> 
>   Works like URL but you can also pass redirected parameters.
> 
>   
> 
> {code}
> The way, this is implemented in {{RequestHandler.java}} works slightly 
> different:
> For the type "url", this is true, but for "cross-redirect", before putting 
> the params in the link, it is checked, if the link begins with an "/".
> If not, it is added as the first char.
> This results in a link given like this: {{https://test.com}}
> will turn into this: {{/https://test.com}}, which will then be treated as an 
> OFBiz internal link, like {{/catalog}}, and instead of be called externally, 
> OFBiz tries to call it as an OFBiz-URL.
> This behavior is not correct and should therefore be corrected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10569) Wrong handling of response type "cross-redirect"

2018-09-20 Thread Dennis Balkir (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16621626#comment-16621626
 ] 

Dennis Balkir commented on OFBIZ-10569:
---

Hi Jacques,

yes this makes sense to me.

But on the other hand, this means, that there simply is no possibility to 
address an external url with params, which would be quite restrictive.

Since there are already different ways to open an internal url with params, why 
not use this, or maybe make a new type, for external url with params?
This is documented this way, even if the documentation is wrong, but it gives 
us the opportunity, to use it that way it could be used.

I see no problem in changing the code, if the documentation already states, 
that it is used that way and since there are other types to open urls 
internally.

> Wrong handling of response type "cross-redirect"
> 
>
> Key: OFBIZ-10569
> URL: https://issues.apache.org/jira/browse/OFBIZ-10569
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework
>Reporter: Dennis Balkir
>Priority: Minor
> Attachments: OFBIZ-10569_RequestHandler.patch
>
>
> When using the response type "cross-redirect", OFBiz is not acting as 
> expected.
> The description of the types "url" and "cross-redirect" is stated as follows 
> in the file {{site-conf.xsd}}:
> {code:xml}
> 
>   
> 
>   Any URL, relative or absolute. Redirected parameters are not used, you 
> can put them in the url.
> 
>   
> 
> 
>   
> 
>   Works like URL but you can also pass redirected parameters.
> 
>   
> 
> {code}
> The way, this is implemented in {{RequestHandler.java}} works slightly 
> different:
> For the type "url", this is true, but for "cross-redirect", before putting 
> the params in the link, it is checked, if the link begins with an "/".
> If not, it is added as the first char.
> This results in a link given like this: {{https://test.com}}
> will turn into this: {{/https://test.com}}, which will then be treated as an 
> OFBiz internal link, like {{/catalog}}, and instead of be called externally, 
> OFBiz tries to call it as an OFBiz-URL.
> This behavior is not correct and should therefore be corrected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10569) Wrong handling of response type "cross-redirect"

2018-09-19 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16620717#comment-16620717
 ] 

Jacques Le Roux commented on OFBIZ-10569:
-

Hi Dennis,

This code is from pre Apache era and has been a slightly modified since (eg 
r741374 and OFBIZ-10438). I made the documentation at r1347762.  At r741742 the 
log message, from pre Apache era, has been confirmed to be "Response is a 
Cross-Application redirect". AFAIK there are never been any examples OOTB. I'm 
not even sure I even used it myself when I documented it (I then used "url"). 

I believe now I was wrong when I wrote this line:
bq.  Works like URL but you can also pass redirected parameters. 

Because AFAIU "cross-redirect" should be used only "internally". As the log 
mentions, it's a *cross applications* (ie for OFBiz internal webapps) redirect. 
It's not like "url" where all is allowed (ie open external calls - with 
possible parameters in URL - under writer's responsability). So I think we  
should rather amend the documentation. I suggest:
bq. Works like request-redirect for cross applications calls.
Then the code makes sense. 

Does it makes sense to you?

> Wrong handling of response type "cross-redirect"
> 
>
> Key: OFBIZ-10569
> URL: https://issues.apache.org/jira/browse/OFBIZ-10569
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework
>Reporter: Dennis Balkir
>Priority: Minor
> Attachments: OFBIZ-10569_RequestHandler.patch
>
>
> When using the response type "cross-redirect", OFBiz is not acting as 
> expected.
> The description of the types "url" and "cross-redirect" is stated as follows 
> in the file {{site-conf.xsd}}:
> {code:xml}
> 
>   
> 
>   Any URL, relative or absolute. Redirected parameters are not used, you 
> can put them in the url.
> 
>   
> 
> 
>   
> 
>   Works like URL but you can also pass redirected parameters.
> 
>   
> 
> {code}
> The way, this is implemented in {{RequestHandler.java}} works slightly 
> different:
> For the type "url", this is true, but for "cross-redirect", before putting 
> the params in the link, it is checked, if the link begins with an "/".
> If not, it is added as the first char.
> This results in a link given like this: {{https://test.com}}
> will turn into this: {{/https://test.com}}, which will then be treated as an 
> OFBiz internal link, like {{/catalog}}, and instead of be called externally, 
> OFBiz tries to call it as an OFBiz-URL.
> This behavior is not correct and should therefore be corrected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)