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

Nicolas Malin commented on OFBIZ-13143:
---------------------------------------

Oh thanks Jacques to have a look !

I'm not proud of this fix, but failed to find a better solution without a lot 
of works.



> Webtools FindGeneric, sort field is break on list
> -------------------------------------------------
>
>                 Key: OFBIZ-13143
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13143
>             Project: OFBiz
>          Issue Type: Bug
>          Components: webtools
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Minor
>              Labels: list, sort, url, url-encoding, webtools
>         Attachments: OFBIZ-13143.patch, image-2024-09-27-15-32-36-309.png
>
>
> On webtools the FindGeneric screen (/webtools/entity/find/{entityName})  have 
> an issue with the sort order.
> After a search if you clic to sort the list, you lost the entityName and your 
> search. The analyse look that come from the url encode 
> (MacroFormRenderer.java:2141), who result a bad interpretation during ftl 
> rendering.
> {code:java}
> linkUrl = rh.makeLink(this.request, this.response, 
> urlPath.concat(URLEncoder.encode(newQueryString, "UTF-8")));
> {code}
> This has been introduce with jira OFBIZ-8302 for security reason.
>  !image-2024-09-27-15-32-36-309.png! 
> To solve this, we implement a new function on UtilCodec.java to ask it if we 
> need to encode the url or not with the presence of the variable 
> escapeUrlEncode.
> Like is test on root context, we need to set this variable on our code where 
> we want to escape the encoding, just before call the MacroRenderer. This it 
> not accessible from the request so no risk for the security origin fix.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to