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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046572
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2021-05-07 10:132021-05-10 08:22
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in VersionPR21Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0046572: ws tests fail having modules in development

DescriptionHaving modules in development, some web service junit tests fail due to incorrect CSRF token management.
Steps To Reproduce1. Set core in developemnt
2. start tomcat
3. run DataSourceSecurity
  ERROR:
10:10:47.003 INFO org.openbravo.test.base.OBBaseTest - *** Starting test case: org.openbravo.test.datasource.DataSourceSecurity.fetchShouldBeAllowedOnlyIfRoleIsGranted[ADMIN_ROLE - dataSource: ProductByPriceAndWarehouse]
10:10:47.213 ERROR org.openbravo.test.datasource.BaseDataSourceTestDal - Cannot retrieve CSRF Token
java.lang.Exception: Cannot find CSRF Token in SessionDynamic response
    at org.openbravo.test.datasource.BaseDataSourceTestDal.findCsrfTokenInResponse(BaseDataSourceTestDal.java:125) ~[classes/:?]
    at org.openbravo.test.datasource.BaseDataSourceTestDal.getTokenFromSessionDynamic(BaseDataSourceTestDal.java:111) [classes/:?]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0127883)
hgbot (developer)
2021-05-07 10:23

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/357 [^]
(0127924)
hgbot (developer)
2021-05-10 08:22

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/357 [^]
(0127925)
hgbot (developer)
2021-05-10 08:22

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 60751f1a3940d74af82316ed8efdf1c31c0bea37
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-05-10T07:07:16+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/60751f1a3940d74af82316ed8efdf1c31c0bea37 [^]

fixes BUG-46572: ws tests fail having modules in development

When not having modules in development the response of the request to
get the CSRF token is minified. Test making use of it looked for the
token assuming it was minified making it fail when it was not.

The regexp to look for the token has been extended to allow optional
blank spaces, also it has been simplified getting in a group directly
the token value instead of parsing it afterward.

---
M src-test/src/org/openbravo/test/datasource/BaseDataSourceTestDal.java
---

- Issue History
Date Modified Username Field Change
2021-05-07 10:13 alostale New Issue
2021-05-07 10:13 alostale Assigned To => platform
2021-05-07 10:13 alostale Modules => Core
2021-05-07 10:13 alostale Triggers an Emergency Pack => No
2021-05-07 10:13 alostale Assigned To platform => alostale
2021-05-07 10:23 hgbot Note Added: 0127883
2021-05-10 08:22 hgbot Resolution open => fixed
2021-05-10 08:22 hgbot Status new => closed
2021-05-10 08:22 hgbot Note Added: 0127924
2021-05-10 08:22 hgbot Fixed in Version => PR21Q3
2021-05-10 08:22 hgbot Note Added: 0127925


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker