Openbravo Issue Tracking System - Retail Modules
View Issue Details
0027248Retail ModulesWeb POSpublic2014-07-31 12:102014-12-30 23:22
Orekaria 
marvintm 
normalminorsometimes
closedfixed 
5
 
RR14Q4 
migueldejuana
No
0027248: Sometimes the session expires before it should, use a different servlet/url for retrieving content before login
Sometimes the session expires before it should. This happens because the mobile core index.jsp page retrieves javascript and other generated content before the login has taken place.

The code uses the KernelServlet for this, this servlet in its base supports only authenticated access. Only with a workaround it was possible to also retrieve content when not yet authenticated.

To make this work better for mobile core applications (like WEBPOS) a new servlet is introduced which should be used for retrieving content generated by Components before logging in.

See the changeset for the index.jsp to get an example of the change needed.
http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/be816be4ad867771b406dcd0e95e0622f5e0c403 [^]
Execute tests until shown in the tomcat log
Change the url to retrieve unauthenticated content.
No tags attached.
depends on defect 00273723.0PR14Q4 closed AugustoMauch Openbravo ERP KernelServlet is not threadsafe 
depends on defect 0027200 closed Orekaria Retail Modules Stabilization: Current user/role has no access to class org.openbravo.retail.posterminal.term.Terminal 
related to defect 0027661RR14Q4 closed mtaal Retail Modules Stabilization: Index.jsp is not expiring so updates do not show up in the browser without clearing the cache 
blocks defect 0027337 acknowledged Retail Retail Modules Stabilization: No tomcat errors while running the WebPOS 
blocks defect 0042676 new Triage Platform Base Openbravo ERP Tomcat error appears when navigating to the ERP landing page with the Autologon feature active 
diff 27248_core_q24.diff (13,399) 2014-10-03 14:09
https://issues.openbravo.com/file_download.php?file_id=7299&type=bug
diff 27248_posterminal_q24.diff (6,125) 2014-10-03 14:09
https://issues.openbravo.com/file_download.php?file_id=7300&type=bug
Issue History
2014-07-31 12:10OrekariaNew Issue
2014-07-31 12:10OrekariaAssigned To => marvintm
2014-07-31 12:10OrekariaTriggers an Emergency Pack => No
2014-08-19 09:00OrekariaNote Added: 0069490
2014-08-19 09:01OrekariaRelationship addedblocks 0026955
2014-08-19 09:01OrekariaRelationship addedblocks 0027337
2014-08-19 13:14mtaalRelationship addeddepends on 0027372
2014-08-22 23:08OrekariaRelationship addeddepends on 0027200
2014-08-23 01:14OrekariaRelationship deletedblocks 0026955
2014-09-23 04:43hgbotCheckin
2014-09-23 04:43hgbotNote Added: 0070255
2014-09-23 04:44hgbotCheckin
2014-09-23 04:44hgbotNote Added: 0070256
2014-09-23 04:44hgbotStatusnew => resolved
2014-09-23 04:44hgbotResolutionopen => fixed
2014-09-23 04:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/be816be4ad867771b406dcd0e95e0622f5e0c403 [^]
2014-09-23 08:33migueldejuanaReview Assigned To => migueldejuana
2014-09-23 08:33migueldejuanaNote Added: 0070264
2014-09-23 08:33migueldejuanaStatusresolved => closed
2014-09-23 08:33migueldejuanaFixed in Version => RR14Q4
2014-09-23 12:02hgbotCheckin
2014-09-23 12:02hgbotNote Added: 0070278
2014-09-23 13:00mtaalSummarySometimes the session expires before it should => Sometimes the session expires before it should, use a different servlet/url for retrieving content before login
2014-09-23 13:00mtaalDescription Updatedbug_revision_view_page.php?rev_id=6605#r6605
2014-09-23 13:00mtaalProposed Solution updated
2014-09-23 15:35hgbotCheckin
2014-09-23 15:35hgbotNote Added: 0070282
2014-09-23 15:35hgbotCheckin
2014-09-23 15:35hgbotNote Added: 0070283
2014-09-23 15:47hgbotCheckin
2014-09-23 15:47hgbotNote Added: 0070284
2014-09-24 19:45hgbotCheckin
2014-09-24 19:45hgbotNote Added: 0070321
2014-09-24 19:47hgbotCheckin
2014-09-24 19:47hgbotNote Added: 0070322
2014-09-24 19:52hgbotCheckin
2014-09-24 19:52hgbotNote Added: 0070325
2014-09-24 20:43OrekariaRelationship addedrelated to 0027661
2014-09-25 11:30hudsonbotCheckin
2014-09-25 11:30hudsonbotNote Added: 0070359
2014-09-25 11:30hudsonbotCheckin
2014-09-25 11:30hudsonbotNote Added: 0070361
2014-09-26 18:17hgbotCheckin
2014-09-26 18:17hgbotNote Added: 0070451
2014-09-29 13:53dmitry_mezentsevNote Added: 0070497
2014-09-29 22:00hudsonbotCheckin
2014-09-29 22:00hudsonbotNote Added: 0070516
2014-10-03 14:09mtaalFile Added: 27248_core_q24.diff
2014-10-03 14:09mtaalFile Added: 27248_posterminal_q24.diff
2014-10-03 15:03hgbotCheckin
2014-10-03 15:03hgbotNote Added: 0070700
2014-10-05 22:54hgbotCheckin
2014-10-05 22:54hgbotNote Added: 0070716
2014-10-05 22:55hgbotCheckin
2014-10-05 22:55hgbotNote Added: 0070717
2014-11-26 11:00hgbotCheckin
2014-11-26 11:00hgbotNote Added: 0072020
2014-11-26 11:02hgbotCheckin
2014-11-26 11:02hgbotNote Added: 0072021
2014-11-26 11:24hgbotCheckin
2014-11-26 11:24hgbotNote Added: 0072022
2014-12-30 23:22hudsonbotCheckin
2014-12-30 23:22hudsonbotNote Added: 0072896
2020-01-02 11:51inaki_garciaRelationship addedcauses 0042676
2020-01-02 11:52inaki_garciaRelationship replacedblocks 0042676

Notes
(0069490)
Orekaria   
2014-08-19 09:00   
http://stackoverflow.com/questions/634929/how-to-check-if-a-session-is-invalid [^]
(0070255)
hgbot   
2014-09-23 04:43   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 578c31177869e77787ded3c857983fd699d292f7
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 23 04:42:33 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/578c31177869e77787ded3c857983fd699d292f7 [^]

Related to issue 27248: Sometimes the session expires before it should
Let all requests before the login go through a non-authenticating servlet

---
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
M web/org.openbravo.mobile.core/source/data/ob-model.js
A src/org/openbravo/mobile/core/MobileCoreComponentServlet.java
---
(0070256)
hgbot   
2014-09-23 04:44   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: be816be4ad867771b406dcd0e95e0622f5e0c403
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 23 04:44:12 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/be816be4ad867771b406dcd0e95e0622f5e0c403 [^]

Fixes issue 27248: Sometimes the session expires before it should
Let all requests before the login go through a non-authenticating servlet

---
M web/org.openbravo.retail.posterminal/index.jsp
---
(0070264)
migueldejuana   
2014-09-23 08:33   
tested and reviewed in dac0cfbd526b
(0070278)
hgbot   
2014-09-23 12:02   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 498c721ca4241f393f2a220a617dbe1e3fedfe3e
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 23 12:00:03 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/498c721ca4241f393f2a220a617dbe1e3fedfe3e [^]

Related to issue 27248: Sometimes the session expires before it should

---
M src/org/openbravo/mobile/core/MobileCoreComponentServlet.java
---
(0070282)
hgbot   
2014-09-23 15:35   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 57a765d1b1540650d27599c1ed75921d25d21bc5
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 23 15:34:15 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/57a765d1b1540650d27599c1ed75921d25d21bc5 [^]

Related to issue 27248: Sometimes the session expires before it should
Changes after code review

---
M src/org/openbravo/mobile/core/MobileCoreComponentServlet.java
---
(0070283)
hgbot   
2014-09-23 15:35   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 68ef4e1ffb147987744280803e4eb639bc74848e
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 23 15:34:39 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/68ef4e1ffb147987744280803e4eb639bc74848e [^]

Related to issue 27248: Sometimes the session expires before it should
Small change as part of this issue, saves one db query

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java
---
(0070284)
hgbot   
2014-09-23 15:47   
Repository: erp/devel/pi
Changeset: e3050b112ed517232a30a960e9d207ae12a15847
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 23 15:37:31 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e3050b112ed517232a30a960e9d207ae12a15847 [^]

Related to issue 27248: Sometimes the session expires before it should
Added deprecated warning to previous code to handle unauthenticated actions added code comments

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelServlet.java
---
(0070321)
hgbot   
2014-09-24 19:45   
Repository: erp/devel/pi
Changeset: 713f25f27b6765d58fb4a45bba4dba49b684568d
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Wed Sep 24 19:44:40 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/713f25f27b6765d58fb4a45bba4dba49b684568d [^]

Related to issue 27248: Added 'howto fix' to the log message, but...
- would still be nicer if we inform in the message about the requested resource so the dev knows which one needs to be changed

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelServlet.java
---
(0070322)
hgbot   
2014-09-24 19:47   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b4430f1e8bc5bec96005349541e35f3d04afe4da
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Wed Sep 24 19:47:02 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b4430f1e8bc5bec96005349541e35f3d04afe4da [^]

Related to issue 27248: Fixed the manifest to use the new servlet

---
M src/org/openbravo/mobile/core/templates/cache-manifest.ftl
---
(0070325)
hgbot   
2014-09-24 19:52   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f6e4ce6e0dd8a631caa7be9856dda6a37ca87b5e
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Wed Sep 24 19:50:28 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f6e4ce6e0dd8a631caa7be9856dda6a37ca87b5e [^]

Related to issue 27248: Fixed 'ApplicationCacheComponent' to use the new servlet and...
- also added the 'DiscountFilterRole' source that was missing in the manifest and was provoking the offline mode to miss this resource

---
M src/org/openbravo/retail/posterminal/ApplicationCacheComponent.java
---
(0070359)
hudsonbot   
2014-09-25 11:30   
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/63604e8e17b7 [^]
Maturity status: Test
(0070361)
hudsonbot   
2014-09-25 11:30   
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/63604e8e17b7 [^]
Maturity status: Test
(0070451)
hgbot   
2014-09-26 18:17   
Repository: erp/devel/pi
Changeset: 6ead95cef7ec799776362fafd47805ba9502fcb1
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Sep 26 18:17:10 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6ead95cef7ec799776362fafd47805ba9502fcb1 [^]

Related to issue 27248: added request url to warning message, made specific methods private
Made specific static methods private as there is no use for them being protected and
would just increase the api.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelServlet.java
---
(0070497)
dmitry_mezentsev   
2014-09-29 13:53   
New API method is approved.
(0070516)
hudsonbot   
2014-09-29 22:00   
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/b0bbca1e7e46 [^]
Maturity status: Test
(0070700)
hgbot   
2014-10-03 15:03   
Repository: erp/pmods/org.openbravo.retail.discounts.combo
Changeset: ab67a4d6a893607ea157c7b018910b545ab59951
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Oct 03 15:03:17 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.combo/rev/ab67a4d6a893607ea157c7b018910b545ab59951 [^]

Related to issue 27248, prevent requests to authenticated servlet
Change urls to use unauthenticated servlet

---
M src/org/openbravo/retail/discounts/combo/master/CombosAppCacheProvider.java
---
(0070716)
hgbot   
2014-10-05 22:54   
Repository: erp/devel/pi
Changeset: a7d456a23dcefc283470644aa448a4a899283816
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Oct 05 22:54:12 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a7d456a23dcefc283470644aa448a4a899283816 [^]

Related to issue 27248: Sometimes the session expires before it should, improve log warning message
Improve the log warning message so that it shows more information when an invalid pre-login
request is received.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelServlet.java
---
(0070717)
hgbot   
2014-10-05 22:55   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 55b9b1d6e54e9ba5b98d7fea8cac6e57b87bba31
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Oct 05 22:55:47 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/55b9b1d6e54e9ba5b98d7fea8cac6e57b87bba31 [^]

Related to issue 27248: Sometimes the session expires before it should, let discounts by total use correct servlet
Changes the url used by the discounts by total module use the mobile.core servlet instead of the
authenticated client kernel servlet.

---
M src/org/openbravo/retail/discounts/bytotal/master/DiscountsByTotalAppCacheProvider.java
---
(0072020)
hgbot   
2014-11-26 11:00   
Repository: erp/pmods/org.openbravo.mobile.procurement
Changeset: eb4d0fd8c1f71ba7917536de24eb211057df360f
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Nov 26 11:00:23 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.procurement/rev/eb4d0fd8c1f71ba7917536de24eb211057df360f [^]

Related issue 27248: Sometimes the session expires before it should
Let all requests before the login go through a non-authenticating servlet

---
M web/org.openbravo.mobile.procurement/index.html
---
(0072021)
hgbot   
2014-11-26 11:02   
Repository: erp/pmods/org.openbravo.mobile.warehouse
Changeset: 46a29c892339c33333e26306472db8401028bb7f
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Nov 26 11:02:17 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.warehouse/rev/46a29c892339c33333e26306472db8401028bb7f [^]

Related issue 27248: Sometimes the session expires before it should
Let all requests before the login go through a non-authenticating servlet

---
M web/org.openbravo.mobile.warehouse/index.html
---
(0072022)
hgbot   
2014-11-26 11:24   
Repository: erp/pmods/org.openbravo.mobile.procurement
Changeset: beebb3a4e197c58a1ab9f1aa66d7437a873f1dd5
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Nov 26 11:24:17 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.procurement/rev/beebb3a4e197c58a1ab9f1aa66d7437a873f1dd5 [^]

Related issue 27248: Sometimes the session expires before it should
Let all requests before the login go through a non-authenticating servlet

---
M src/org/openbravo/mobile/procurement/ProcurementApplicationCacheComponent.java
---
(0072896)
hudsonbot   
2014-12-30 23:22   
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/6525fe229e06 [^]
Maturity status: Test