Bug 451036

Summary: attachment: tempfile should be readonly
Product: [Applications] kmail2 Reporter: adi
Component: commands and actionsAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: bugsnmd, jjm
Priority: NOR    
Version: 5.15.3   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:

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