Bug 150044 - FILESAVE Enabling Calc shared mode removes editing password
Summary: FILESAVE Enabling Calc shared mode removes editing password
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Balázs Varga (allotropia)
URL:
Whiteboard: target:7.5.0 target:7.4.0.2
Keywords: implementationError
Depends on:
Blocks: Password-Protected
  Show dependency treegraph
 
Reported: 2022-07-18 11:50 UTC by Gabor Kelemen (allotropia)
Modified: 2022-07-22 10:56 UTC (History)
0 users

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example file from Calc with open and edit passwords (11.92 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-07-18 11:50 UTC, Gabor Kelemen (allotropia)
Details
Original file asks for password for Edit mode (32.61 KB, image/png)
2022-07-18 11:57 UTC, Gabor Kelemen (allotropia)
Details
file save error (7.44 KB, image/png)
2022-07-19 12:25 UTC, Shinji Enoki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-07-18 11:50:50 UTC
Created attachment 181308 [details]
Example file from Calc with open and edit passwords

This is similar to bug 119491

When a Calc file has both open and edit password set and sharing is enabled, the edit password is set, yet the read-only setting is retained.

1, Open attached file. You need to enter password "test".
2, Select Edit - Edit mode. You need to enter password "hello".
3, Select Tools - Share Spreadsheet. Tick "Share this spreadsheet with other users" and press OK.
4, Save the file when asked.
5, Close the file and repeat steps 1-2.

You need to enter the file open password, but not the one for edit mode in step 2.

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 72f631977435a704008a55d3be6489ba619e3064
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

Seems to have started in 4.4 when the Edit - Edit mode option was added. Before that I can't find the option to unlock the edit password to turn on sharing.
Comment 1 Gabor Kelemen (allotropia) 2022-07-18 11:57:54 UTC
Created attachment 181309 [details]
Original file asks for password for Edit mode
Comment 2 Shinji Enoki 2022-07-19 12:23:48 UTC
Reproduced in:

Version: 7.3.4.2 / LibreOffice Community
Build ID: 728fec16bd5f605073805c3c9e7c4212a0120dc5
CPU threads: 8; OS: Linux 5.18; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 36994c19fdbf425108f685de21464496bd93b651
CPU threads: 8; OS: Linux 5.18; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded


However, in my environment below I got a save error when saving the file after step 4. It is also possible that the problem only occurs in my local environment.

> Err saving the document opne-edit-pass:
> General Error.
> General/input/otput error.

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 36994c19fdbf425108f685de21464496bd93b651
CPU threads: 8; OS: Linux 5.18; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded
Comment 3 Shinji Enoki 2022-07-19 12:25:18 UTC
Created attachment 181327 [details]
file save error
Comment 4 Gabor Kelemen (allotropia) 2022-07-21 10:03:35 UTC
(In reply to Shinji Enoki from comment #3)
> Created attachment 181327 [details]
> file save error

Thanks for spotting this, I did not really try to save after turning on the Edit mode without using password.
Filed as a separate bug.
Comment 5 Commit Notification 2022-07-21 15:31:56 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c7b6c9407ce109ab27257f4c1ec66b86b48622df

tdf#150044 sc import: fix editing password in shared mode

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2022-07-22 10:56:46 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/42a355514cc9a8bee238ad456e9a30249beea715

tdf#150044 sc import: fix editing password in shared mode

It will be available in 7.4.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.