From 879dc0d90a6fd6fafa2408102bb1132a44a93d1d Mon Sep 17 00:00:00 2001 From: pmeinhardt Date: Fri, 19 Apr 2024 19:02:44 +0200 Subject: [PATCH] =?UTF-8?q?Limit=20access=20to=20preview=20file=20?= =?UTF-8?q?=F0=9F=91=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We only want the current user to be able to view the preview file, to protect against exposing any sensitive information to other users. --- plugin/maxdown.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/maxdown.vim b/plugin/maxdown.vim index 1951f1f..efb84d9 100644 --- a/plugin/maxdown.vim +++ b/plugin/maxdown.vim @@ -68,6 +68,7 @@ function! s:preview() abort let source = expand('%:p') let dest = expand('~/.maxdown.preview.html') call s:invoke(dest, source, bufnr('%')) + call setfperm(dest, 'rw-------') call s:show(dest, expand('%:t')) endfunction