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 9.04, SVN trunk Environment: All Reporter: Patrick Antivackis Priority: Critical 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+R instead of 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 function framework/widget/src/org/ofbiz/widget/WidgetWorker.java : 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. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Antivackis updated OFBIZ-2628: -------------------------------------- Description: 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+R instead of 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 function 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 was: 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+R instead of 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 function framework/widget/src/org/ofbiz/widget/WidgetWorker.java : need to use defaultWebEncoder.encodeForURL instead of simpleEncoder Beofre i do the fix, can a core developper let me know about possible side effects > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > 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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Antivackis updated OFBIZ-2628: -------------------------------------- Attachment: OFBIZ-2628-widget.patch This is a fix for the widget control in order to Url encode the value of parameters. > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723302#action_12723302 ] Patrick Antivackis commented on OFBIZ-2628: ------------------------------------------- Concerning OfbizUrl patch, I really need inputs from a core developper, as the update of the makeLink function is in fact IMO not the right way to solve this issue. I do think that the use of ${....?url} freemarker function should be the right way to create url. But it's quite a wide task to update all ofbiz ftl Any opinion ? > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753080#action_12753080 ] Jacques Le Roux commented on OFBIZ-2628: ---------------------------------------- Hi Patrick, Your patch looks good, though it's not an habit in OFBiz to put reference to Jira issues in code. This afterall would add a lot of useless informations, we try to keep the code as clean as possible. I had a look at http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref_builtin_url and http://freemarker.sourceforge.net/docs/pgui_misc_charset.html, but I'd still prefer to make the change in makeLink (I suppose you mean in the "encode section") as # it's used widely and not only in OfbizUrlTransform (look for references in Eclipse) # as you said putting ?url in templates would be wide and hazardous task (I guess I did not check, using regexp replacement in Eclipse you can do miracles) My 2 cts > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769847#action_12769847 ] Jacques Le Roux commented on OFBIZ-2628: ---------------------------------------- Hi PAtrick, I was ready to commit your patch but I'd prefer to commit the changes to makelink in the same shoot. Could you please update your patch with the change you propose ? Or have you some concerns about the way you propose to change makelink ? > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771148#action_12771148 ] Patrick Antivackis commented on OFBIZ-2628: ------------------------------------------- Jacques, In fact I tried, as you proposed, to create a bug fix in the RequestHandler.makelink, but i stumble onto the following question: Why in the <@ofbizurl> tag, the & to separate parameters in the query string is written as & like in the applications/product/webapp/catalog/find/sidecatalogs.ftl line 29 : <@ofbizUrl>EditCategory?CATALOG_TOP_CATEGORY=${prodCatalogCategory.productCategoryId}&productCategoryId=${prodCatalogCategory.productCategoryId}</@ofbizUrl> and like in many other ftl templates (maybe all) Is it the mandatory way to do it and is it writtent clearly somewhere ? I ask this because,personnaly i always used only the & without the & in the ofbizurl tag. So if it is the official way to write queryString, i can do the patch, else if it is not, i can't because the queryString would contains '&' that doesn't mean 'separation of parameters', like dvd+r is in fact output dvd+r by freemarker ${product.productId} > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771148#action_12771148 ] Patrick Antivackis edited comment on OFBIZ-2628 at 10/28/09 10:13 PM: ---------------------------------------------------------------------- Jacques, In fact I tried, as you proposed, to create a bug fix in the RequestHandler.makelink, but i stumble onto the following question: Why in the <@ofbizurl> tag, the & to separate parameters in the query string is written as & amp; like in the applications/product/webapp/catalog/find/sidecatalogs.ftl line 29 : <@ofbizUrl>EditCategory?CATALOG_TOP_CATEGORY=${prodCatalogCategory.productCategoryId}& amp;productCategoryId=${prodCatalogCategory.productCategoryId}</@ofbizUrl> and like in many other ftl templates (maybe all) Is it the mandatory way to do it and is it writtent clearly somewhere ? I ask this because,personnaly i always used only the & without the & in the ofbizurl tag. So if it is the official way to write queryString, i can do the patch, else if it is not, i can't because the queryString would contains '&' that doesn't mean 'separation of parameters', like dvd+r is in fact output dvd+r by freemarker ${product.productId} was (Author: patrick.antivackis): Jacques, In fact I tried, as you proposed, to create a bug fix in the RequestHandler.makelink, but i stumble onto the following question: Why in the <@ofbizurl> tag, the & to separate parameters in the query string is written as & like in the applications/product/webapp/catalog/find/sidecatalogs.ftl line 29 : <@ofbizUrl>EditCategory?CATALOG_TOP_CATEGORY=${prodCatalogCategory.productCategoryId}&productCategoryId=${prodCatalogCategory.productCategoryId}</@ofbizUrl> and like in many other ftl templates (maybe all) Is it the mandatory way to do it and is it writtent clearly somewhere ? I ask this because,personnaly i always used only the & without the & in the ofbizurl tag. So if it is the official way to write queryString, i can do the patch, else if it is not, i can't because the queryString would contains '&' that doesn't mean 'separation of parameters', like dvd+r is in fact output dvd+r by freemarker ${product.productId} > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771160#action_12771160 ] Scott Gray commented on OFBIZ-2628: ----------------------------------- We should be using & to separate parameters since we target xhtml > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771148#action_12771148 ] Patrick Antivackis edited comment on OFBIZ-2628 at 10/28/09 10:26 PM: ---------------------------------------------------------------------- Jacques, In fact I tried, as you proposed, to create a bug fix in the RequestHandler.makelink, but i stumble onto the following question: Why in the <@ofbizurl> tag, the & to separate parameters in the query string is written as & amp; like in the applications/product/webapp/catalog/find/sidecatalogs.ftl line 29 : <@ofbizUrl>EditCategory?CATALOG_TOP_CATEGORY=${prodCatalogCategory.productCategoryId}& amp;productCategoryId=${prodCatalogCategory.productCategoryId}</@ofbizUrl> and like in many other ftl templates (maybe all) Is it the mandatory way to do it and is it writtent clearly somewhere ? I ask this because,personnaly i always used only the & without the & in the ofbizurl tag. So if it is the official way to write queryString, i can do the patch, else if it is not, i can't because the queryString would contains '&' that doesn't mean 'separation of parameters', like dvd+r is in fact output dvd& #43;r by freemarker ${product.productId} was (Author: patrick.antivackis): Jacques, In fact I tried, as you proposed, to create a bug fix in the RequestHandler.makelink, but i stumble onto the following question: Why in the <@ofbizurl> tag, the & to separate parameters in the query string is written as & amp; like in the applications/product/webapp/catalog/find/sidecatalogs.ftl line 29 : <@ofbizUrl>EditCategory?CATALOG_TOP_CATEGORY=${prodCatalogCategory.productCategoryId}& amp;productCategoryId=${prodCatalogCategory.productCategoryId}</@ofbizUrl> and like in many other ftl templates (maybe all) Is it the mandatory way to do it and is it writtent clearly somewhere ? I ask this because,personnaly i always used only the & without the & in the ofbizurl tag. So if it is the official way to write queryString, i can do the patch, else if it is not, i can't because the queryString would contains '&' that doesn't mean 'separation of parameters', like dvd+r is in fact output dvd+r by freemarker ${product.productId} > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771160#action_12771160 ] Scott Gray edited comment on OFBIZ-2628 at 10/28/09 10:30 PM: -------------------------------------------------------------- We should be using {code:xml}&{code} to separate parameters since we target xhtml EDIT: jira turned my & amp; into & was (Author: lektran): We should be using & to separate parameters since we target xhtml > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771168#action_12771168 ] Patrick Antivackis commented on OFBIZ-2628: ------------------------------------------- You are right. Thank you Scott for this efficient answer. > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Antivackis updated OFBIZ-2628: -------------------------------------- Attachment: (was: OFBIZ-2628-widget.patch) > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > 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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Antivackis updated OFBIZ-2628: -------------------------------------- Attachment: Patch-OFBIZ-2628.txt Trunk patch at revision 830787 > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: Patch-OFBIZ-2628.txt > > 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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771183#action_12771183 ] Patrick Antivackis edited comment on OFBIZ-2628 at 10/29/09 9:37 PM: --------------------------------------------------------------------- Trunk patch at revision 830787 Patch not good, need to rework it was (Author: patrick.antivackis): Trunk patch at revision 830787 > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > 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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Antivackis updated OFBIZ-2628: -------------------------------------- Attachment: (was: Patch-OFBIZ-2628.txt) > 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 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > 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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875534#action_12875534 ] Jacques Le Roux commented on OFBIZ-2628: ---------------------------------------- I was looking at this issue by chance (actually 1st in most important list) and trying to associate DVD+R a parent rollup I got this error ERROR: Could not complete the Add ProductCategory to Category [file:/home/ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml#addProductCategoryToCategory] process [problem creating the newEntity value: Error while inserting: [GenericEntity:ProductCategoryRollup][createdStamp,2010-06-04 10:01:45.461(java.sql.Timestamp)][createdTxStamp,2010-06-04 10:01:45.439(java.sql.Timestamp)][fromDate,2010-06-04 11:00:40.44(java.sql.Timestamp)][lastUpdatedStamp,2010-06-04 10:01:45.461(java.sql.Timestamp)][lastUpdatedTxStamp,2010-06-04 10:01:45.439(java.sql.Timestamp)][parentProductCategoryId,CATALOG1(java.lang.String)][productCategoryId,DVD R(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_CATEGORY_ROLLUP (PRODUCT_CATEGORY_ID, PARENT_PRODUCT_CATEGORY_ID, FROM_DATE, THRU_DATE, SEQUENCE_NUM, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_CATEGORY_ROLLUP' caused a violation of foreign key constraint 'PROD_CRLP_CURRENT' for key (DVD R). The statement has been rolled back.))] Patrick, do you think you will continue to work on this, have you solved it? Thanks > 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 > Priority: Critical > 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+R instead of > 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 function > 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. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |