Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013690Openbravo ERPA. Platformpublic2010-06-17 18:252011-11-30 13:36
shuehner 
dbaz 
normalminorhave not tried
closedfixed 
5
pi 
 
Core
No
0013690: ajax.js functions: submitXmlHttpRequestWithParams & submitXmlHttpRequest send extra garbage when asked to send form-fields
The code inside those functions does send useless extra-infos when passed an html-form instead of only the html-form data-fields.

This leads to confusing warnings in the tomcat-logfile, which can't parse this extra garbage:
Jun 17, 2010 6:00:08 PM org.apache.tomcat.util.http.Parameters processParameters
WARNING: Parameters: Invalid chunk '=%3CTABLE%20class%3DButton%3E%0D%0A%3CTBODY%3E%0D%0A%3CTR%3E%0D%0A%3CTD%20class%3DButton_left%3E%3CIMG%20class%3DButton_Icon%20title%3D%22Show%20log%22%20border%3D0%20alt%3D%22Show%20log%22%20src%3D%22../web/images/blank.gif%22%3E%3C/IMG%3E%3C/TD%3E%0D%0A%3CTD%20class%3DButton_text%3EShow%20log%3C/TD%3E%0D%0A%3CTD%20class%3DButton_right%3E%3C/TD%3E%3C/TR%3E%

Problem is that those functions to not check the form-content correctly and blindly send all fields having an type argument.

Compare to the function setFilters in searchs.js for another code doing the same properly (filtering for i.e. input,checkbox,. etc..)

I.e. use Rebuild popup from mp19 with IE as a browser and check the tomcat logfile (catalina.out) while the rebuild popup is running.
No tags attached.
Issue History
2010-06-17 18:25shuehnerNew Issue
2010-06-17 18:25shuehnerAssigned To => alostale
2010-06-23 10:39alostaleStatusnew => scheduled
2010-06-23 10:39alostaleAssigned Toalostale => dbaz
2010-06-23 10:39alostalefix_in_branch => pi
2011-11-09 21:14hgbotCheckin
2011-11-09 21:14hgbotNote Added: 0042710
2011-11-09 21:14hgbotStatusscheduled => resolved
2011-11-09 21:14hgbotResolutionopen => fixed
2011-11-09 21:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2e8a0e5507215167fe403d8d01ae4f04262417c2 [^]
2011-11-12 15:48hudsonbotCheckin
2011-11-12 15:48hudsonbotNote Added: 0042787
2011-11-16 17:07iperdomoNote Added: 0042884
2011-11-16 20:28hgbotCheckin
2011-11-16 20:28hgbotNote Added: 0042898
2011-11-16 20:30hgbotCheckin
2011-11-16 20:30hgbotNote Added: 0042899
2011-11-16 20:46dbazNote Added: 0042901
2011-11-22 03:50hudsonbotCheckin
2011-11-22 03:50hudsonbotNote Added: 0043038
2011-11-22 03:50hudsonbotCheckin
2011-11-22 03:50hudsonbotNote Added: 0043039
2011-11-30 13:36iperdomoNote Added: 0043579
2011-11-30 13:36iperdomoStatusresolved => closed

Notes
(0042710)
hgbot   
2011-11-09 21:14   
Repository: erp/devel/pi
Changeset: 2e8a0e5507215167fe403d8d01ae4f04262417c2
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Nov 09 21:13:57 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2e8a0e5507215167fe403d8d01ae4f04262417c2 [^]

Fixed issue 13690: Removed rubish parameters from ajax queries

---
M src/org/openbravo/erpCommon/security/Login.html
M src/org/openbravo/erpCommon/security/Login_F1.html
M web/js/ajax.js
M web/js/utils.js
---
(0042787)
hudsonbot   
2011-11-12 15:48   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9752fe729257 [^]

Maturity status: Test
(0042884)
iperdomo   
2011-11-16 17:07   
Code review:
In the changeset the condition is
if (text !== null && text !== "" && text !== "=" && text.indexOf('=') !== 0) {
 // do something
}

null == false ... true
"" == false ... true

So this expression could be rewriten to

if(text && text !== "=" && text.indexOf('=') !== 0) {
 // do something
}

The resulting expression is more consice. But if we check the expression:

text !== "="

Is already cover with the text.indexOf('=') !== 0, since if text is "=" indexOf will be 0.

Finally, the expression could be:

if(text && text.indexOf('=') !== 0) {
  // do something
}

Do you agree?
(0042898)
hgbot   
2011-11-16 20:28   
Repository: erp/devel/pi
Changeset: 544c0ad3895fb90c615aa217b48796b02d1bf41c
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Nov 16 20:28:25 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/544c0ad3895fb90c615aa217b48796b02d1bf41c [^]

Related to issue 13690: applied code-review suggestions

---
M web/js/ajax.js
---
(0042899)
hgbot   
2011-11-16 20:30   
Repository: erp/devel/pi
Changeset: 7a476dc0a21d3f361c5b5d66e21abd2e5f785dad
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Nov 16 20:29:57 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7a476dc0a21d3f361c5b5d66e21abd2e5f785dad [^]

Related to issue 13690: applied code-review suggestions - coding format change

---
M web/js/ajax.js
---
(0042901)
dbaz   
2011-11-16 20:46   
In order to reproduce it go to

As "System Administrator" go to "Module Management" window in IE
Click "Scan for updates" button

and check tomcat log

NOTE: Just focus in the tomcat log and not in the click behavior, since there is other issue for this particular button already opened (this has nothing to see with this issue)
https://issues.openbravo.com/view.php?id=19091 [^]
(0043038)
hudsonbot   
2011-11-22 03:50   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ebd713dfe507 [^]

Maturity status: Test
(0043039)
hudsonbot   
2011-11-22 03:50   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ebd713dfe507 [^]

Maturity status: Test
(0043579)
iperdomo   
2011-11-30 13:36   
Tested on pi @ rev 1a06ff3266eb

Checked using "Scan for Updates" and looking at the application log.