LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-02-2024, 08:00 AM   #1
linuxuser371038
Member
 
Registered: Jan 2024
Posts: 48

Rep: Reputation: 1
How to stop vim from storing sensitive data in registers indefinitely?


This is a huge security problem.

If opening a file in vim, such as a password file, or even highlighting it either on a browser or unnamed register then vim will just keep that data indefinitely.

How can you stop vim from absorbing data you don't want it to take in and keeping it visible in the registers indefinitely?

It even saves that data between restarts.

Of course the registers are useful most of the time so I don't want them disabled completely just to not take up sensitive data when I don't want it to.

I have found a command to wipe all registers for a vim session but this has little practical benefit as if you open a new vim then the information will be visible again so it is being held somewhere else.

Not sure the best way to work it is in order to have access to the registers for everyday tasks, as I use them often, and vim is my main editor, but for sensitive data to be kept out of them.

I also use gnu pass and notice that vim does not store those ones as pass wipes its register after 45 seconds.

I don't want to use pass for everything though or at least I don't want the same store for everything but many use cases don't warrant a whole new store. Sometimes passwords are not ones I want to keep for ages so pass may not be suitable.

So is there not another way to have similar functionality, to be able to open a password file to use the password but then make sure it is wiped from any system registered when whatever opened it closes?

EDIT: Oh I see the .viminfo is where all this is stored so either deleting that or preventing it from using one at the startup of vim with -i flag should do the job. As long as I have the * and + registers, which don't seem beholden to the .viminfo, I think I can do without all the other registers.

EDIT 2: Unless there is any further comment adding
Code:
set viminfo="0"
to
Code:
.vimrc
seems to have done the trick.

Last edited by linuxuser371038; 05-02-2024 at 08:29 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
storing passwords and like sensitive info in linux? WiseDraco Slackware 17 10-09-2017 12:47 AM
Printing registers with gdb: "No registers" is all I get. stf92 Slackware 2 03-09-2015 02:41 PM
[SOLVED] Compiling vim for use in xterm with primary and clipboard registers, * and + porphyry5 Slackware 3 05-04-2014 11:35 AM
LXer: Advanced Vim registers LXer Syndicated Linux News 0 01-16-2013 07:01 PM
Want to create a directory for storing personnal sensitive information,(openSuSe) edmondgyampoh Linux - Newbie 5 05-18-2009 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration