refactor: deprecate 'secure' option

Now that 'exrc' files must be explicitly marked trusted there is no need
to constrain what can be done in them.
This commit is contained in:
Gregory Anders
2022-11-06 19:44:30 -07:00
parent 294910a1ff
commit 6d9c3d903e
10 changed files with 14 additions and 52 deletions

View File

@@ -5129,19 +5129,6 @@ A jump table for the options with a short description can be found at |Q_op|.
two letters (See |object-motions|). The default makes a section start
at the nroff macros ".SH", ".NH", ".H", ".HU", ".nh" and ".sh".
*'secure'* *'nosecure'* *E523*
'secure' boolean (default off)
global
When on, ":autocmd", shell and write commands are not allowed in
".nvimrc" and ".exrc" in the current directory and map commands are
displayed. Switch it off only if you know that you will not run into
problems, or when the 'exrc' option is off. On Unix this option is
only used if the ".nvimrc" or ".exrc" is not owned by you. This can be
dangerous if the systems allows users to do a "chown". You better set
'secure' at the end of your |init.vim| then.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'selection'* *'sel'*
'selection' 'sel' string (default "inclusive")
global

View File

@@ -641,6 +641,9 @@ Options:
*'prompt'* *'noprompt'*
*'remap'* *'noremap'*
*'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
*'secure'*
Everything is allowed in 'exrc' files since they must be explicitly marked
trusted.
*'shelltype'*
*'shortname'* *'sn'* *'noshortname'* *'nosn'*
*'swapsync'* *'sws'*