Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrollback editing leaving possibly world-readable files in /tmp #2661

Open
valankar opened this issue Jul 31, 2023 · 1 comment
Open

Scrollback editing leaving possibly world-readable files in /tmp #2661

valankar opened this issue Jul 31, 2023 · 1 comment

Comments

@valankar
Copy link

Basic information

zellij --version: 0.37.2
stty size: 52 140
uname -av or ver(Windows): Linux pontus 4.19.123-feral #2 SMP Mon May 18 09:01:14 BST 2020 x86_64 GNU/Linux

Further information
I noticed when editing the scrollback, via search -> e, a file ending in .dump is created in /tmp and opened in the editor. However, when quitting the editor, the file stays around. Shouldn't it be deleted once the editor exits? I'm on a shared host. The file is not readable by others, which is good (though hopefully not dependent on umask).

@valankar
Copy link
Author

valankar commented Aug 3, 2023

Unfortunately this seems to honor umask, making the scrollback fully readable in /tmp:

valankar@pontus ~> ls -l /tmp |grep valank                                                                                                                                                                                                                                        (base)
-rw-r--r--  1 valankar      valankar        655 Aug  3 13:31 d45f5562-eeb7-4095-bf94-83de979a3ae7.dump
-rw-r--r--  1 valankar      valankar        799 Aug  3 13:30 e5e0d39a-564b-4e8b-87ae-ea83ef05eea3.dump

I suggest if not auto-deleting, to force the permissions to be unreadable by others. Otherwise there is a lot of information other users can get from these files.

@valankar valankar changed the title Scrollback editing leaves files in /tmp Scrollback editing leaving possibly world-readable files in /tmp Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant