Project: Birt
Bug 267563 Password in Property binding is modified after reopen the data source
Reported: 2009-03-08 21:06:30 | Status: closed fixed

Description: Password in Property binding is modified after reopen the data source Build number: 2.5.0.v20090309-0630 Steps to reproduce: 1, New a JDBC Data source 2, Specify the password in Property Binding page, for example abcdefg and finish the data source 3, Check the XML source to make sure the password has been encrypted, in my build the code is YWJjZGVmZw==. 4, Reopen the data source and goto Property Binding and Finish data source 5, At this time, the report has a dirty mark and save the report and recheck the encrypted code in XML Source, it has been modified to abcdAAAA. 6, Do Step4 again and click OK to finsh the data source 7, After step6, the report is modified and save the report(after saving, Exception thrown out and block the UI operation) Expected result: The reopen will not change the password in Property Binding Actual result: After step4, the encrypted code has been changed, so that the report has a dirty mark and after step6, a Exception thrown out and it will block all the UI operation. Error log: org.eclipse.birt.report.designer.core.runtime.GUIException: -73 at org.eclipse.birt.report.designer.core.runtime.GUIException.createGUIException(GUIException.java:78) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:169) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:150) at org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler.handle(ExceptionHandler.java:89) at org.eclipse.birt.report.designer.internal.ui.ide.adapters.IDEFileReportProvider.saveFile(IDEFileReportProvider.java:376) at org.eclipse.birt.report.designer.internal.ui.ide.adapters.IDEFileReportProvider.saveReport(IDEFileReportProvider.java:133) at org.eclipse.birt.report.designer.internal.ui.ide.adapters.IDEFileReportProvider.saveReport(IDEFileReportProvider.java:110) at org.eclipse.birt.report.designer.internal.ui.editors.layout.ReportEditorWithPalette.doSave(ReportEditorWithPalette.java:1012) at org.eclipse.birt.report.designer.ui.editors.MultiPageReportEditor.doSave(MultiPageReportEditor.java:497) at org.eclipse.birt.report.designer.ui.editors.IDEMultiPageReportEditor.doSave(IDEMultiPageReportEditor.java:413) at org.eclipse.birt.report.designer.ui.editors.ReportEditorProxy.doSave(ReportEditorProxy.java:220) at org.eclipse.ui.internal.SaveableHelper$1.run(SaveableHelper.java:143) at org.eclipse.ui.internal.SaveableHelper$4.run(SaveableHelper.java:266) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2577) at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:274) at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:253) at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:148) at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1353) at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:3322) at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3335) at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:471) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:823) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:879) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:570) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:511) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:126) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1190) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1040) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1036) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1358) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4019) at org.eclipse.swt.widgets.Tree.WM_CHAR(Tree.java:5825) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3912) at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5821) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4597) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2393) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3468) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2388) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2352) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1270) Caused by: java.lang.ArrayIndexOutOfBoundsException: -73 at org.apache.commons.codec.binary.Base64.isBase64(Base64.java:137) at org.apache.commons.codec.binary.Base64.discardNonBase64(Base64.java:478) at org.apache.commons.codec.binary.Base64.decodeBase64(Base64.java:374) at org.apache.commons.codec.binary.Base64.decode(Base64.java:220) at org.eclipse.birt.report.model.metadata.SimpleEncryptionHelper.decrypt(SimpleEncryptionHelper.java:85) at org.eclipse.birt.report.model.util.EncryptionUtil.decrypt(EncryptionUtil.java:79) at org.eclipse.birt.report.model.api.elements.structures.PropertyBinding.getIntrinsicProperty(PropertyBinding.java:120) at org.eclipse.birt.report.model.core.Structure.getLocalProperty(Structure.java:188) at org.eclipse.birt.report.model.core.Structure.getProperty(Structure.java:159) at org.eclipse.birt.report.model.core.Structure.getProperty(Structure.java:144) at org.eclipse.birt.report.model.writer.ModuleWriter.writeStructureList(ModuleWriter.java:1163) at org.eclipse.birt.report.model.writer.ModuleWriter.visitModule(ModuleWriter.java:1386) at org.eclipse.birt.report.model.elements.ElementVisitor.visitReportDesign(ElementVisitor.java:402) at org.eclipse.birt.report.model.writer.DesignWriter.visitReportDesign(DesignWriter.java:74) at org.eclipse.birt.report.model.elements.ReportDesign.apply(ReportDesign.java:92) at org.eclipse.birt.report.model.writer.ModuleWriter.writeFile(ModuleWriter.java:309) at org.eclipse.birt.report.model.writer.ModuleWriter.write(ModuleWriter.java:297) at org.eclipse.birt.report.model.api.ModuleHandle.serialize(ModuleHandle.java:1610) at org.eclipse.birt.report.designer.internal.ui.ide.adapters.IDEFileReportProvider$2.execute(IDEFileReportProvider.java:330) at org.eclipse.birt.report.designer.internal.ui.ide.adapters.IDEFileReportProvider$2$1.run(IDEFileReportProvider.java:297) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.birt.report.designer.internal.ui.ide.adapters.IDEFileReportProvider$2.run(IDEFileReportProvider.java:310) at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) at org.eclipse.birt.report.designer.internal.ui.ide.adapters.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:71) at org.eclipse.birt.report.designer.internal.ui.ide.adapters.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:63) at org.eclipse.birt.report.designer.internal.ui.ide.adapters.IDEFileReportProvider.saveFile(IDEFileReportProvider.java:364) ... 68 more

Files changed in fix:
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/elements/structures/PropertyBinding.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/command/MemberRecord.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/EncryptionUtil.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java