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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0009274
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2009-06-01 19:002009-06-27 00:00
ReporteralostaleView Statuspublic 
Assigned Tomarvintm 
PriorityurgentResolutionfixedFixed in Versionmain
StatusclosedFix in branchpiFixed in SCM revision3b46e2f1f313
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0009274: export.database security mechanism does not work properly with mercurial.

Descriptionexport.database security mechanism does not work properly with mercurial.

The problem is the mercurial changes the revision for the whole working copy for each commit, and the security mechanism does not allow to export database in case the revision in the repository does not match with the one in database (which is updated whenever a create.database or update.database is executed).
Steps To ReproduceIn a hg working copy:
-Create database
-Do modifications in db
-export database -> it works fine
-commit changes -> the working copy revision changes
-export database -> it is not possible since the revisions do not match
Proposed SolutionThe security mechanism should be defined as:
-If revision numbers match export
-If they do not match, look all the revisions in src-db/database after the one in db. If all the revisions are done by the user trying to export allow it other case deny it-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0016858)
iciordia (manager)
2009-06-02 12:15

Simpler (and better :-) proposed solution:
DBSourceManager synchronizes database and xml files using two tasks: update.database (db is sync with model in xml files) and export.database (xml files are sync with model in db).

After every synchonization the system saves in db the date/time and CRC of xml files in model of that synchronization.

When executing update.database the system checks that no change have happened in db after last synchronization (current behaviour, nothing to do)

When executing export.database the system checks that no change have happened in xml files (by comparing crc) after last synchronization (symetric to update.database check).

Ismael
(0017298)
hgbot (developer)
2009-06-15 12:36

Repository: dbsourcemanager
Revision: 337
Author: marvintm
Date: 2009-06-15 12:36:35 +0200 (Mon, 15 Jun 2009)

Fixed issue 9274. Now the security mechanism for export.database will compare the CRC from the files, instead of using the Mercurial revision.

---
U trunk/src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
U trunk/src/org/openbravo/ddlutils/task/ExportDatabase.java
U trunk/src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---

https://dev.openbravo.com/websvn/dbsourcemanager/?rev=337&sc=1 [^]
(0017299)
hgbot (developer)
2009-06-15 12:37

Repository: erp/devel/pi
Changeset: 3b46e2f1f313c24203dd3354015d82340addba25
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Jun 15 12:36:43 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3b46e2f1f313c24203dd3354015d82340addba25 [^]

Fixed issue 9274. Now the security mechanism for export.database will compare the CRC from the files, instead of using the Mercurial revision.

---
M src-core/src/org/openbravo/utils/CheckSum.java
M src-db/database/lib/dbsourcemanager.jar
---

- Issue History
Date Modified Username Field Change
2009-06-01 19:00 alostale New Issue
2009-06-01 19:00 alostale Assigned To => marvintm
2009-06-02 12:15 iciordia Note Added: 0016858
2009-06-05 13:12 psarobe Status new => scheduled
2009-06-05 13:12 psarobe fix_in_branch => pi
2009-06-15 12:36 hgbot Checkin
2009-06-15 12:36 hgbot Note Added: 0017298
2009-06-15 12:36 hgbot Status scheduled => resolved
2009-06-15 12:36 hgbot Resolution open => fixed
2009-06-15 12:37 hgbot Checkin
2009-06-15 12:37 hgbot Note Added: 0017299
2009-06-15 12:37 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3b46e2f1f313c24203dd3354015d82340addba25 [^]
2009-06-22 11:09 psarobe Fixed in Version => main
2009-06-26 18:39 psarobe Status resolved => closed
2009-06-27 00:00 anonymous sf_bug_id 0 => 2813023


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker