vim-editorconfig icon indicating copy to clipboard operation
vim-editorconfig copied to clipboard

This plugin distibuted with vim?

Open ffes opened this issue 7 years ago • 9 comments
trafficstars

Are you aware of this issue: https://github.com/vim/vim/issues/2286

Please note the last part of it 😉

ffes avatar May 07 '18 11:05 ffes

Oh, I forgot the issue. Of course, there are no problem for me.

sgur avatar May 07 '18 23:05 sgur

There are some security issues which should be addressed before considering distribution with vim. Modelines are widely considered insecure, but editorconfig is much worse. Consider:

charset = cp932 | !echo "you've been hacked 1"
spell_language = en_us | !echo "you've been hacked 2"

Not to mention the local_vim option, which should be blacklisted by default.

andymass avatar May 08 '18 02:05 andymass

Thank you for your reporting. I created an issue #31

sgur avatar May 09 '18 00:05 sgur

Bump

polyzen avatar Jul 25 '18 23:07 polyzen

Here is another exploit. Allows sourcing any vim script regardless of user's settings.

[*]
charset = cp932 foldexpr:execute(\"let\ g:editorconfig_local_vimrc\\75\ 1\") foldmethod:expr foldenable foldlevel:0
local_vimrc = exploit

Just to be clear: this is a very fine plugin and it does what it was designed to do. But more users should be doing extensive testing and hardening, especially if they want it to be considered for inclusion in vim (even though this happening is far from guaranteed for a variety of reasons also not related to the quality of this plugin.)

andymass avatar Jul 25 '18 23:07 andymass

Thank you for reporting.

I created #33.

sgur avatar Jul 27 '18 03:07 sgur

I fixed #31 and #33.

I would appreciate that you reported such issues becase this plugin was created for my convenience so I wasn't concerned about security issues.

sgur avatar Jul 27 '18 05:07 sgur

BTW: if you really want to have your plugin included with Vim, I suggest mentioning it at the Vim issue. You should mention your license, that you intend to maintain it (which means that whenever you have a release ready for inclusion with Vim, submit the whole plugin to Bram).

chrisbra avatar Aug 18 '18 08:08 chrisbra

@sgur are you interested, per my recent comment, https://github.com/vim/vim/issues/2286#issuecomment-481398889

lollipopman avatar Apr 09 '19 19:04 lollipopman