Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040570Retail ModulesStoreServerpublic2019-04-10 11:232019-06-24 10:55
shuehner 
jarmendariz 
normalmajorhave not tried
closedfixed 
5
 
RR19Q3 
AugustoMauch
No
0040570: MobileServercontroller.isThereACentralServerDefined is not using bind-parameters
This code is not using bind-params:

      OBQuery<MobileServerDefinition> servers = OBDal.getInstance()
          .createQuery(MobileServerDefinition.class,
              "client.id=:clientId and " + MobileServerDefinition.PROPERTY_ACTIVE + "=true and "
                  + MobileServerDefinition.PROPERTY_MOBILESERVERKEY + "!='" + mobileServerKey
                  + "' and " + MobileServerDefinition.PROPERTY_SERVERTYPE + "='"
                  + MobileServerUtils.MAIN_SERVER + "' order by "
                  + MobileServerDefinition.PROPERTY_PRIORITY);

NOTE: Apparently identical query is also present in readCentralServer method in same file without having that bug.
Probably both should be centralized apart of fixing the bug.
-
No tags attached.
blocks design defect 0038136 acknowledged Triage Platform Base Openbravo ERP Tracking issue: Find & Fix queries not using bind-params but embedding values into query string 
patch issue 40570 source mobilecore.patch (6,163) 2019-05-16 09:05
https://issues.openbravo.com/file_download.php?file_id=12954&type=bug
Issue History
2019-04-10 11:23shuehnerNew Issue
2019-04-10 11:23shuehnerAssigned To => StoreServer
2019-04-10 11:23shuehnerTriggers an Emergency Pack => No
2019-04-10 11:23shuehnerRelationship addedblocks 0038136
2019-05-13 12:44shuehnerTarget Version => RR19Q3
2019-05-13 15:02ranjith_qualiantech_comAssigned ToStoreServer => ranjith_qualiantech_com
2019-05-14 11:06ranjith_qualiantech_comStatusnew => scheduled
2019-05-15 13:28marvintmAssigned Toranjith_qualiantech_com => AugustoMauch
2019-05-16 09:05ranjith_qualiantech_comFile Added: issue 40570 source mobilecore.patch
2019-06-21 09:48jarmendarizAssigned ToAugustoMauch => jarmendariz
2019-06-21 13:18hgbotCheckin
2019-06-21 13:18hgbotNote Added: 0112938
2019-06-21 13:18hgbotStatusscheduled => resolved
2019-06-21 13:18hgbotResolutionopen => fixed
2019-06-21 13:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/08d0a7b376ca2af9499af50031b895fda20a2b68 [^]
2019-06-21 13:24jarmendarizReview Assigned To => AugustoMauch
2019-06-24 10:55AugustoMauchNote Added: 0112967
2019-06-24 10:55AugustoMauchStatusresolved => closed

Notes
(0112938)
hgbot   
2019-06-21 13:18   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 08d0a7b376ca2af9499af50031b895fda20a2b68
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Fri Jun 21 11:26:32 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/08d0a7b376ca2af9499af50031b895fda20a2b68 [^]

Fixed issue 40570: OBQuery in MobileServerController not using bind params.

Refactored MobileServerController to group a duplicated query into a single
method and modified it to use bind parameters insteads of appending them to
the query string directly.

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0112967)
AugustoMauch   
2019-06-24 10:55   
Code reviewed and verified