ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepak Dixit (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-2628) No Url encoding for get parameters
Date Fri, 28 Sep 2012 06:33:07 GMT

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

Deepak Dixit commented on OFBIZ-2628:

As attrName is part of  primary key  and due to url encoding space replace with + symbol so
lookupValue is not able to find the record. 
Update Product attribute is working fine because there in no encoding in update post form
Here is update product attribute form:
<form name="UpdateProductAttribute_o_0" onsubmit="javascript:submitFormDisableSubmits(this)"
class="basic-form" id="UpdateProductAttribute_o_0" action="/catalog/control/updateProductAttribute"
method="post" novalidate="novalidate">
  <input type="hidden" id="UpdateProductAttribute_productId_o_0" value="DEMO-PRODUCT-1"
  <input type="hidden" id="UpdateProductAttribute_attrName_o_0" value="Test Attribute"
  <input type="text" autocomplete="off" id="UpdateProductAttribute_attrValue_o_0" size="25"
  <input type="text" autocomplete="off" id="UpdateProductAttribute_attrType_o_0" size="25"
  <input type="submit" value="Update" name="submitButton">

Here is delete product attribute:

<form name="UpdateProductAttribute_o_0_0_o_deleteLink" onsubmit="javascript:submitFormDisableSubmits(this)"
action="/catalog/control/deleteProductAttribute" method="post">
  <input type="hidden" value="DEMO-PRODUCT-1" name="productId">
  <input type="hidden" value="Test+Attribute" name="attrName">
  <input type="hidden" value="0" name="VIEW_INDEX_1">
  <input type="hidden" value="20" name="VIEW_SIZE_1">
> No Url encoding for get parameters
> ----------------------------------
>                 Key: OFBIZ-2628
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2628
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 4.0, Release Branch 09.04, SVN trunk
>         Environment: All
>            Reporter: Patrick Antivackis
>            Assignee: Sascha Rodekamp
>            Priority: Critical
>             Fix For: Release Branch 11.04, SVN trunk, Release Branch 12.04
>         Attachments: OFBIZ-2628-Add-URL-encoding-to-RequestHandler.patch, OFBIZ-2628-Add-URL-encoding-to-RequestHandler.patch,
OFBIZ-2628-encoding-hidden-post-params (list forms).patch, OFBIZ-2628-encoding-hidden-post-params.patch,
>   Original Estimate: 4h
>  Remaining Estimate: 4h
> Let's say I want to create a new category which ID is  DVD+R
> Creation is ok through the admin interface, but whenever i want to access this category,
the get parameter productCategoryId=.... of the url is wrong as it's not url encoded, so we
have :
> https://localhost:8443/catalog/control/EditCategory?productCategoryId=DVD&#43;R instead
> https://localhost:8443/catalog/control/EditCategory?productCategoryId=DVD%2BR
> Both <@ofbizUrl> tag and menu widgets are not encoding get parameters.
> Way to correct :
> framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java modify the makeLink
> framework/widget/src/org/ofbiz/widget/WidgetWorker.java : function buildhyperlinkUrl
need to use defaultWebEncoder.encodeForURL instead of simpleEncoder
> Beofre i do the fix, can a core developper let me know about possible side effects

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message