Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2021-05-05 16:382021-05-17 10:14
ReportershuehnerView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in VersionPR21Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR21Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0046520: junit DataSourceSecurity.fetchShouldBeAllowedOnlyIfRoleIsGranted fails on Tomcat9 (only for Datasource: AccountTreeMovement)

DescriptionThis junit test fails when application is deployed on tomcat 9.x but only for the specific datasource AccountTreeMovement.
It shows 4 failures as four RoleTypes are tested for each dataSource.

Problem is the test triggering the following error on tomcat 9.x:
May 05 12:27:36 ip-172-31-9-130 tomcat9[2709]: Error parsing HTTP request header
May 05 12:27:36 ip-172-31-9-130 tomcat9[2709]: Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
May 05 12:27:36 ip-172-31-9-130 tomcat9[2709]: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Steps To ReproduceDeploy application with tomcat 9.x
ant run.test -Dtest=org.openbravo.test.datasource.DataSourceSecurity

Check result*.xml file in src/ folder for the result of the test run
Proposed SolutionFix the invalid request target (values in url) to be valid.

TagsNo tags attached.
Attached Filesdiff file icon tmp.diff [^] (1,224 bytes) 2021-05-05 16:41 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0046567PR21Q1.2 closedalostale junit DataSourceSecurity.fetchShouldBeAllowedOnlyIfRoleIsGranted fails on Tomcat9 (only for Datasource: AccountTreeMovement) 
depends on backport 0046568PR20Q4.4 closedalostale junit DataSourceSecurity.fetchShouldBeAllowedOnlyIfRoleIsGranted fails on Tomcat9 (only for Datasource: AccountTreeMovement) 
depends on backport 0046579PR21Q2 closedalostale junit DataSourceSecurity.fetchShouldBeAllowedOnlyIfRoleIsGranted fails on Tomcat9 (only for Datasource: AccountTreeMovement) 
blocks design defect 0046518 closedTriage Platform Base Support Tomcat 9 

-  Notes
shuehner (administrator)
2021-05-05 16:40

Problem can also be reproduced by directly using curl for the url:
http://localhost:8080/openbravo/org.openbravo.service.datasource/D2F94DC86DEC48D69E4BFCE59DC670CF?_skinVersion=Default&_create=true&Constants_FIELDSEPARATOR=$&_new=true&_contextUrl=http://localhost:8080/openbravo&Constants_IDENTIFIER=_identifier&_startRow=0&_endRow=200&referencedTableId=188&parentRecordId=56E65CF592BD4DAF8A8A879810646266&tabId=132&_selectedProperties=['searchKey','name','elementLevel','accountType','showValueCondition','summaryLevel']&@FinancialMgmtElement.client@=23C59575B9CF467C9620760EB255B389& [^]
It shows:
curl: (3) bad range specification in URL position 372:

As first test just properly encoding the [ and ] values in the url avoid the problems.
Patch for testing is attached to this issue. However probably the whole URL should be properly URL-encoded.
shuehner (administrator)
2021-05-05 16:42

Note that probably we need to back-patch that not only to open releases but maybe more (to cover any codeline wanted to be tested in CI (i.e. customer branches) assuming we want to switch all CI over to new stack having only tomcat)
hgbot (developer)
2021-05-11 10:36

Merge Request created: [^]
hgbot (developer)
2021-05-17 10:14

Merge request merged: [^]
hgbot (developer)
2021-05-17 10:14

Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: 2af65c29fdfb7f3b24a3d11f954354e8b238a861
Author: Asier Lostalé <>
Date: 2021-05-17T08:14:30+00:00
URL: [^]

fixes BUG-46520: DataSourceSecurity fails on Tomcat9

fetchShouldBeAllowedOnlyIfRoleIsGranted test was creating an invalid
request by adding some parameters with special characters and not
ecoding them. Tomcat 9 is stricter parsing URLs than previous version,
not allowing this case.

Fixed by removing those parameters that were causing problems as they
were not ncessary.

M src-test/src/org/openbravo/test/datasource/

- Issue History
Date Modified Username Field Change
2021-05-05 16:38 shuehner New Issue
2021-05-05 16:38 shuehner Assigned To => platform
2021-05-05 16:38 shuehner Modules => Core
2021-05-05 16:38 shuehner Triggers an Emergency Pack => No
2021-05-05 16:40 shuehner Note Added: 0127835
2021-05-05 16:41 shuehner File Added: tmp.diff
2021-05-05 16:42 shuehner Note Added: 0127836
2021-05-05 16:42 shuehner Relationship added blocks 0046518
2021-05-05 16:43 shuehner Target Version => PR21Q3
2021-05-07 08:11 alostale Assigned To platform => alostale
2021-05-07 08:11 alostale Status new => scheduled
2021-05-07 11:30 alostale Relationship added depends on 0046579
2021-05-11 10:36 hgbot Note Added: 0127985
2021-05-17 10:14 hgbot Resolution open => fixed
2021-05-17 10:14 hgbot Status scheduled => closed
2021-05-17 10:14 hgbot Note Added: 0128198
2021-05-17 10:14 hgbot Fixed in Version => PR21Q3
2021-05-17 10:14 hgbot Note Added: 0128199

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker