Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0013690 | Openbravo ERP | A. Platform | public | 2010-06-17 18:25 | 2011-11-30 13:36 |
|
Reporter | shuehner | |
Assigned To | dbaz | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | pi | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0013690: ajax.js functions: submitXmlHttpRequestWithParams & submitXmlHttpRequest send extra garbage when asked to send form-fields |
Description | 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..)
|
Steps To Reproduce | 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. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2010-06-17 18:25 | shuehner | New Issue | |
2010-06-17 18:25 | shuehner | Assigned To | => alostale |
2010-06-23 10:39 | alostale | Status | new => scheduled |
2010-06-23 10:39 | alostale | Assigned To | alostale => dbaz |
2010-06-23 10:39 | alostale | fix_in_branch | => pi |
2011-11-09 21:14 | hgbot | Checkin | |
2011-11-09 21:14 | hgbot | Note Added: 0042710 | |
2011-11-09 21:14 | hgbot | Status | scheduled => resolved |
2011-11-09 21:14 | hgbot | Resolution | open => fixed |
2011-11-09 21:14 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/2e8a0e5507215167fe403d8d01ae4f04262417c2 [^] |
2011-11-12 15:48 | hudsonbot | Checkin | |
2011-11-12 15:48 | hudsonbot | Note Added: 0042787 | |
2011-11-16 17:07 | iperdomo | Note Added: 0042884 | |
2011-11-16 20:28 | hgbot | Checkin | |
2011-11-16 20:28 | hgbot | Note Added: 0042898 | |
2011-11-16 20:30 | hgbot | Checkin | |
2011-11-16 20:30 | hgbot | Note Added: 0042899 | |
2011-11-16 20:46 | dbaz | Note Added: 0042901 | |
2011-11-22 03:50 | hudsonbot | Checkin | |
2011-11-22 03:50 | hudsonbot | Note Added: 0043038 | |
2011-11-22 03:50 | hudsonbot | Checkin | |
2011-11-22 03:50 | hudsonbot | Note Added: 0043039 | |
2011-11-30 13:36 | iperdomo | Note Added: 0043579 | |
2011-11-30 13:36 | iperdomo | Status | resolved => 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
---
|
|
|
|
|
|
|
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
|
|
|
|
(0042899)
|
hgbot
|
2011-11-16 20:30
|
|
|
|
(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 [^] |
|
|
|
|
|
|
|
|
|
Tested on pi @ rev 1a06ff3266eb
Checked using "Scan for Updates" and looking at the application log. |
|