Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0041942 | Openbravo ERP | A. Platform | public | 2019-10-08 08:21 | 2019-12-16 12:37 |
|
Reporter | cberner | |
Assigned To | cberner | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR20Q1 | |
Merge Request Status | |
Review Assigned To | AugustoMauch |
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 | 0041942: Apply new HQL Style to platform classes |
Description | StringBuffer/Builder in platform HQL/SQL should be replaced by String.
Possible HQL injections from both dynamic and static HQL queries should be minimized and if possible entirely removed.
A list of files that need to be modified to comply with this can be found in this spreadsheet[1].
[1]https://docs.google.com/spreadsheets/d/1WDm5MLQlWU98YjTbFRFs_fgDX5IDirvPe9nUXC-hU5o [^] |
Steps To Reproduce | In description. |
Proposed Solution | Change all StringBuffers and StringBuilders used for HQL to Strings. Remove possible HQL injections from both dynamic and static HQL queries. |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | design defect | 0041287 | | acknowledged | Triage Platform Base | Tracking issue: Convert HQL to apply new style | related to | defect | 0042432 | | closed | cberner | API Change: Changed StringBuffer parameter to String in method clause | causes | defect | 0043272 | | closed | cberner | When importing translation for no longer existing elements -> INFO message is missing all necessary details |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2019-10-08 08:21 | cberner | New Issue | |
2019-10-08 08:21 | cberner | Assigned To | => cberner |
2019-10-08 08:21 | cberner | Modules | => Core |
2019-10-08 08:21 | cberner | Triggers an Emergency Pack | => No |
2019-10-08 08:21 | cberner | Status | new => acknowledged |
2019-10-15 09:18 | cberner | Relationship added | related to 0041287 |
2019-10-15 09:39 | cberner | Summary | StringBuffer/Builder in platform HQL/SQL should be replaced by String => Apply new HQL Style to platform classes |
2019-10-15 09:39 | cberner | Description Updated | bug_revision_view_page.php?rev_id=19502#r19502 |
2019-10-15 09:39 | cberner | Proposed Solution updated | |
2019-11-11 12:37 | cberner | Status | acknowledged => scheduled |
2019-11-28 11:00 | cberner | Relationship added | related to 0042432 |
2019-11-28 16:21 | hgbot | Checkin | |
2019-11-28 16:21 | hgbot | Note Added: 0115951 | |
2019-11-28 17:06 | hgbot | Checkin | |
2019-11-28 17:06 | hgbot | Note Added: 0115954 | |
2019-11-28 17:06 | hgbot | Status | scheduled => resolved |
2019-11-28 17:06 | hgbot | Resolution | open => fixed |
2019-11-28 17:06 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/c47b63fff5775ab73ce8072af4fa6fd6c13d197e [^] |
2019-11-28 19:25 | AugustoMauch | Review Assigned To | => AugustoMauch |
2019-12-12 23:01 | hudsonbot | Checkin | |
2019-12-12 23:01 | hudsonbot | Note Added: 0116293 | |
2019-12-16 12:37 | AugustoMauch | Note Added: 0116341 | |
2019-12-16 12:37 | AugustoMauch | Status | resolved => closed |
2019-12-16 12:37 | AugustoMauch | Fixed in Version | => 3.0PR20Q1 |
2020-02-19 17:47 | shuehner | Relationship added | causes 0043272 |
Notes |
|
(0115951)
|
hgbot
|
2019-11-28 16:21
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: e18eb55dc9330d7fb306f04cf195b2b19d984d7c
Author: Cristian Berner <cristian.berner <at> openbravo.com>
Date: Tue Nov 12 16:20:41 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e18eb55dc9330d7fb306f04cf195b2b19d984d7c [^]
Related to issue 41942: Applies new HQL style to query
---
M src/org/openbravo/mobile/core/listener/InitializeLastPingFromCentralServer.java
M src/org/openbravo/mobile/core/listener/StatusBackgroundProcessScheduler.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
|
|
|
(0115954)
|
hgbot
|
2019-11-28 17:06
|
|
Repository: erp/devel/pi
Changeset: c47b63fff5775ab73ce8072af4fa6fd6c13d197e
Author: Cristian Berner <cristian.berner <at> openbravo.com>
Date: Tue Oct 08 11:48:18 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c47b63fff5775ab73ce8072af4fa6fd6c13d197e [^]
Fixes issue 41942: Apply new HQL Style to platform classes
StringBuffers and StringBuilders have been changed to String.
Some queries have been modified to use PreparedStatement, as this is not
prone to SQL Injection.
Some dynamic HQL queries have been modified to remove possible injections. Behaviour is the same as before.
Some refactoring was made in older classes.
New HQL convention has been applied to all modified classes.
---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/ParametersActionHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentUtils.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/RoleInfo.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoComponent.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationActionHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java
M modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOBUtils.java
M modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOpenbravoComponent.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/HQLDataSourceService.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/LinkToParentTreeDatasourceService.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/model/domaintype/SelectorDomainType.java
M src/org/openbravo/base/model/ModelProvider.java
M src/org/openbravo/base/model/Property.java
M src/org/openbravo/base/model/domaintype/TreeDomainType.java
M src/org/openbravo/base/secureApp/DefaultValuesData.java
M src/org/openbravo/base/secureApp/UserLock.java
M src/org/openbravo/base/structure/BaseOBObject.java
M src/org/openbravo/cluster/ClusterServiceManager.java
M src/org/openbravo/dal/security/OrganizationStructureProvider.java
M src/org/openbravo/dal/service/DataPoolChecker.java
M src/org/openbravo/dal/service/OBQuery.java
M src/org/openbravo/erpCommon/ad_forms/TranslationHandler.java
M src/org/openbravo/erpCommon/ad_forms/TranslationManager.java
M src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
M src/org/openbravo/erpCommon/businessUtility/Preferences.java
M src/org/openbravo/erpCommon/obps/ActivationKey.java
M src/org/openbravo/erpCommon/utility/SystemInfo.java
M src/org/openbravo/erpCommon/utility/Utility.java
M src/org/openbravo/service/dataset/DataSetService.java
M src/org/openbravo/service/rest/DalWebService.java
---
|
|
|
|
|
|
|
Code reviewed and verified |
|