Bug 451036 - attachment: tempfile should be readonly
Summary: attachment: tempfile should be readonly
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 5.15.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-02 13:19 UTC by adi
Modified: 2024-01-23 06:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adi 2022-03-02 13:19:15 UTC
SUMMARY
When opening an attachment (like an office document), the document gets saved into a temporary location but with read-write permissions. As a consequence, software like libreoffice opens the file for editing. If the document would be read-only permissionwise, libreoffice would open the file read-only.


STEPS TO REPRODUCE
1. Click on an attachment (office document)
2. Choose "Open"
3. libreoffice opens the document
 
OBSERVED RESULT
The file is opened in libreoffice in read-write mode; all changes to the file are saved in the temporary location.

EXPECTED RESULT
The file should be saved read-only (i.e. with 0400 instead of 0600) in the temporary location as that makes libreoffice open the file in read-only mode for viewing only. If the user wants to edit the document, libreoffice asks the user to save the file first.
Comment 1 NMD 2024-01-17 16:36:48 UTC
I have also observed this bug recently