Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0020788
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2012-06-16 15:592012-06-29 12:43
ReportershuehnerView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0MP13
StatusclosedFix in branchFixed in SCM revision61be8cba1e04
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0MP7.1SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0020788: Calls to dal-based webservices fail if the license contains an expired module and the auth is done in the ws-call

DescriptionWhen doing a call to i.e. /ws/dal without having an active session, but passing user+password parameters in the request itself

and

having that instance activated with a license which contains at least one module which is expired (it does not matter if that module is really installed or not).

Then the ws-call fails with the following error:
org.openbravo.base.exception.OBException: Exception thrown Exception thrown null
    org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:63)
    org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)

root cause

org.openbravo.base.exception.OBException: Exception thrown null
    org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:63)
    org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:71)
    org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
    org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)

root cause

java.lang.NullPointerException
    org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:569)
    org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:560)
    org.openbravo.dal.service.OBDal.get(OBDal.java:274)
    org.openbravo.erpCommon.obps.ActivationKey.getExpiredInstalledModules(ActivationKey.java:1159)
    org.openbravo.erpCommon.obps.ActivationKey.checkOPSLimitations(ActivationKey.java:864)
    org.openbravo.erpCommon.obps.ActivationKey.refreshIfNeeded(ActivationKey.java:1303)
    org.openbravo.erpCommon.obps.ActivationKey.getInstance(ActivationKey.java:247)
    org.openbravo.authentication.AuthenticationManager.webServicePostAuthenticate(AuthenticationManager.java:213)
    org.openbravo.authentication.AuthenticationManager.webServiceAuthenticate(AuthenticationManager.java:181)
    org.openbravo.service.web.BaseWebServiceServlet.service(BaseWebServiceServlet.java:69)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
    org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:41)
    org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:62)
    org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:71)
    org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
    org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
Steps To ReproduceActivate an instance with a license having at least one module in the license which is expired (to-date < today)
Make sure no active login from the current browser exists
Do a call to the following url:
http://localhost:8080/openbravo/ws/dal?l=Openbravo&p=openbravo [^]

Notice it fails
TagsNo tags attached.
Attached Filesdiff file icon issue_20788_mp7.1.diff [^] (1,682 bytes) 2012-06-16 16:02 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0049874)
shuehner (administrator)
2012-06-16 16:00

That issue is reproducible in both 3.0MP7.1 and also in latest pi (rev: 577ab9166797 from 2012-06-16).
(0049875)
shuehner (administrator)
2012-06-16 16:01

There is a testing license created in butler which can be used to reproduce the bug (search for the issue in in the customer name field in all licenses)
(0049876)
shuehner (administrator)
2012-06-16 16:02

The attached patch against mp7.1 seems to be fix issue so could be used as a base for a fix.
(0049888)
alostale (manager)
2012-06-18 12:09

Note this issue occurs when there is at least an expired module in the license, regardless it is actually installed in the instance or not.
(0049912)
alostale (manager)
2012-06-19 11:38

Provided fix affects license validation for ws, defined test plan should cover possible cases, so the fix shouldn't be regression risky.

Executed test plan:

*Apply license with a module having expiration date before than license expiration date
*Before the module date expires, install it
*Test dal ws works properly
*Set date to after expiration
*Test dal ws doesn't work with a proper message
*Disable the module
*Test dal ws works properly
*Uninstall the module
*Test dal ws works properly
(0049913)
hgbot (developer)
2012-06-19 11:43

Repository: erp/devel/pi
Changeset: 61be8cba1e0458d4ec90840af1d96fb0cb6dbdb7
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jun 19 11:42:38 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/61be8cba1e0458d4ec90840af1d96fb0cb6dbdb7 [^]

fixed bug 20788: Call to dal ws fail if the license contains an expired module

---
M src/org/openbravo/authentication/AuthenticationManager.java
M src/org/openbravo/base/secureApp/LoginHandler.java
M src/org/openbravo/erpCommon/obps/ActivationKey.java
---
(0050122)
hudsonbot (developer)
2012-06-27 05:28

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/cf3a7135839f [^]

Maturity status: Test
(0050282)
AugustoMauch (manager)
2012-06-29 12:43

Code reviewed and verified in pi@419121245486

- Issue History
Date Modified Username Field Change
2012-06-16 15:59 shuehner New Issue
2012-06-16 15:59 shuehner Assigned To => alostale
2012-06-16 15:59 shuehner Modules => Core
2012-06-16 16:00 shuehner Note Added: 0049874
2012-06-16 16:01 shuehner Note Added: 0049875
2012-06-16 16:02 shuehner File Added: issue_20788_mp7.1.diff
2012-06-16 16:02 shuehner Note Added: 0049876
2012-06-18 12:09 alostale Note Added: 0049888
2012-06-19 11:38 alostale Note Added: 0049912
2012-06-19 11:43 hgbot Checkin
2012-06-19 11:43 hgbot Note Added: 0049913
2012-06-19 11:43 hgbot Status new => resolved
2012-06-19 11:43 hgbot Resolution open => fixed
2012-06-19 11:43 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/61be8cba1e0458d4ec90840af1d96fb0cb6dbdb7 [^]
2012-06-27 05:28 hudsonbot Checkin
2012-06-27 05:28 hudsonbot Note Added: 0050122
2012-06-29 12:43 AugustoMauch Note Added: 0050282
2012-06-29 12:43 AugustoMauch Status resolved => closed
2012-06-29 12:43 AugustoMauch Fixed in Version => 3.0MP13


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker