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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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}
> <xs:enumeration value="url">
>   <xs:annotation>
>     <xs:documentation>
>       Any URL, relative or absolute. Redirected parameters are not used, you can put them in the url.
>     </xs:documentation>
>   </xs:annotation>
> </xs:enumeration>
> <xs:enumeration value="cross-redirect">
>   <xs:annotation>
>     <xs:documentation>
>       Works like URL but you can also pass redirected parameters.
>     </xs:documentation>
>   </xs:annotation>
> </xs:enumeration>
> {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)