Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Can't remove password from file (regression) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | General | Reporter: | DonJaime <donjaime> | ||||||
Component: | ui | Assignee: | Oliver-Rainer Wittmann <orw> | ||||||
Status: | CLOSED FIXED | QA Contact: | |||||||
Severity: | Normal | ||||||||
Priority: | P3 | CC: | doneyourself, doudou1976, jsc, orw, polo8495, zheng.easyfan | ||||||
Version: | 3.4.0 Beta (OOo) | Flags: | jsc:
3.4.1_release_blocker+
|
||||||
Target Milestone: | 3.4.1 | ||||||||
Hardware: | PC | ||||||||
OS: | All | ||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
Description
DonJaime
2012-05-16 15:26:09 UTC
I have reproduce the described defect on Windows 7 with OOo 3.4 beta and AOO 3.4. It works fine in OOo 3.3 forgot to confirm Agree this should be taken as zoo 341 release blocker. Taking a look on this issue. Maybe give response in several days. set release blocker flag for 3.4.1 Created attachment 78458 [details]
The solution of i119366
This issue was solved. In general, this is a setting confusion issue. In current saving process, both SID_ENCRYPTIONDATA and SID_PASSWORD are working for setting password on a document. Refer to the SfxObjectShell::ExecFile_Impl() in file SRC/sfx2/source/doc/objserv.cxx:line 595-599 please. And, as what we imagine, after doing the file dialog executing with deselecting the check box of "Save with password", the result parameter set, which is to customize saving process, wont record said 2 SID inside anymore, for indicating that the following saving process will not concern about the password stuff anymore. But when performing the exact preparation SaveAs process in SfxobjectShell::PreDoSaveAs_impl(), only the the default SID_PASSWORD was cleared, but SID_ENCRYPTIONDATA was not. The issue happens. For solving it, we just simply add the item SID_ENCRYPTIONDATA clearing in SfxobjectShell::PreDoSaveAs_impl(), similar as the SID_PASSWORD. taking over for reviewing the patch Comment on attachment 78458 [details]
The solution of i119366
minor remark:
the patch does not contain the full path information for the patched file objstor.cxx. I am lucky that I know that it located in /sfx2/source/doc/
Comment on attachment 78458 [details]
The solution of i119366
The patch looks good and works.
But it does not solve the issue, if the "Save As..." action is used to overwrite the existing file.
-> zhengfan: I have reviewed your patch. It solves the issue when saving a document under a new file name. When the document is saved via "Save As..." to overwrite the existing file the password protection is not removed. Will you continue your work on this issue to solve this defect, too? If yes, I will assign this issue to you. Otherwise, I can take care of it. assigning to zhengfan as he will continue to work on this issue. Created attachment 78487 [details]
new patch
Refine the patch following the Oliver's use case
taking over this issue for reviewing the new patch. Thx zhengfan for the new solution. Comment on attachment 78487 [details]
new patch
finished my review -> patch works and solves the problem as far as I can see
Comment on attachment 78458 [details]
The solution of i119366
I think this patch can be marked as obsolete as it is included in the new one.
applied the patch to trunk - revision 1354039 I took the freedom to adjust the formatting and the comments. If this is not ok, I will adjust it. merged patch from trunk into branch AOO34, revision 1354054 Verify not fixed on trunk r1354384, Failed to saved a file with password, the failed message in dialog is "General Error: Generral input/output error", also failed open the password protect file, it pop up password incorrect dialog but i input correct password. Reopen this bug. My Platform is Win 7 X64 EN. Test again with MS format (.xls) it will work fine, but with our format (.ods), the issue i mentioned before will repro. I verfity the bug on build version 1354384 on Win7 OS I save .ods .odt .odp without password successfully ,but save .ods .odt .odp with password ,the error message pop up I verify this bug on build version r1351960 on Win7 OS I save .ods .odt .odp without password or password ,which is successful lucky for me that I have 3 build enviroment on verification this, all of them are under Windows XP. The difference are: In build env A, there is no moz package involved; In build env B, there is moz package involved, but without my solution of issue 119366; In build env C, there is moz package involved and with my solution of issue 119366; And I did the following test cases: In env A: 1.1 Save into ODT, without password, passed; 1.2 Save into ODT, with password, failed, with error message "General Error: Generral input/output error"; 1.3 Save into DOC, without password, passed; 1.4 Save into DOC, with password, passed; But in continual case: "Save As without password", failed; 2.1 Save into ODP, without password, passed; 2.2 Save into ODP, with password, failed, with error message "General Error: Generral input/output error"; 2.3 Save into PPT, without password, passed; 2.4 Save into PPT, the "saveing with password" checkbox is disabled... Weird. 3.1 Save into ODS, without password, passed; 3.2 Save into ODS, with password, failed, with error message "General Error: Generral input/output error"; 3.3 Save into XLS, without password, passed; 3.4 Save into XLS, with password, passed; But in continual case: "Save As without password", failed; In env B: 1.1 Save into ODT, without password, passed; 1.2 Save into ODT, with password, passed; But in continual case: "Save As without password", failed; 1.3 Save into DOC, without password, passed; 1.4 Save into DOC, with password, passed; But in continual case: "Save As without password", failed; 2.1 Save into ODP, without password, passed; 2.2 Save into ODP,with password, passed; But in continual case: "Save As without password", failed; 2.3 Save into PPT, without password, passed; 2.4 Save into PPT, the "saveing with password" checkbox is disabled... Weird. 3.1 Save into ODS, without password, passed; 3.2 Save into ODS, with password, passed; But in continual case: "Save As without password", failed; 3.3 Save into XLS, without password, passed; 3.4 Save into XLS, with password, passed; But in continual case: "Save As without password", failed; In env C: 1.1 Save into ODT, without password, passed; 1.2 Save into ODT, with password, passed; In continual case: "Save As without password", Passed; 1.3 Save into DOC, without password, passed; 1.4 Save into DOC, with password, passed; In continual case: "Save As without password", Passed; 2.1 Save into ODP, without password, passed; 2.2 Save into ODP,with password, passed; In continual case: "Save As without password", Passed; 2.3 Save into PPT, without password, passed; 2.4 Save into PPT, the "saveing with password" checkbox is disabled... Weird. 3.1 Save into ODS, without password, passed; 3.2 Save into ODS, with password, passed; In continual case: "Save As without password", Passed; 3.3 Save into XLS, without password, passed; 3.4 Save into XLS, with password, passed; In continual case: "Save As without password", Passed; Conclution: Such error messages are caused missing moz package building involved. And such I/O error message only occurs in the ODF format file saving with password. Both ODF format saving with password and OFFICE format saving with password have the issue 119366; My solution could work on both MS office files saving and ODF format saving; For you review. Test again on trunk r1355082 which include modules nss and moz. From the result I think we can close this bug. Test with 3 scenario. A. Saved with password, then remove password with same revision B. Saved with password with OOo3.3, then remove password with r1355082 C. Saved with password with MS 2003, then remove password with r1355082 Result: Scenario A: ods/xls/odt/odp work fine doc can saved with password successfully, but when reopen the saved file, it is under read-only mode. This also repro on OOo 3.3 ppt is weird, in OOo 3.3, In saved dialog, the password check box can check, input password and saved the file then reopen it, No need password, so saved with password in OOo3.3 for ppt format is not work. In trunk r1355082, In saved dialog, "saveing with password" checkbox is disabled If we saved ppt file with password protect by OpenOffice, then open in MS Office, no need input password, so it is totally not work. Scenario B: ods/xls/odt/odp work fine doc file with password open under read-only mode, we can saved to another file to remove password. ppt file can't saved with password protect Scenario C: xls work fine doc file with password open under read-only mode, we can saved to another file to remove password. ppt file with password protect by MS office can't open in Open Office, it said "Read Error. the loading of password-encrypted Microsoft PowerPint presentations is not supported." For PPT issue, there have 2 bugs about saved(Bug 39527) and loading(Bug 46307) For doc open with read-only mode issue, i think it is a know issue, but i can't find the bug in bugzilla, I will double check in bugzilla and open a new one if need. Verify fixed on AOO34 branch r1354891. Close this bug set target milestone AOO 3.4.1 |