Closed SkyLeach closed 6 years ago
ok I reverted my bundle copy to master and it looks good. ty!
FWIW I also opened https://github.com/dpallot/simple-websocket-server/issues/73 - until that's fixed, you might want to only import the modules you need instead of doing import *
(which is regarded bad practice either way).
I was looking for how to replicate external editing in vim. Found the plugin vim-ghost and decided to try it.
The problem is that it depends on a direct (not pypi hosted) install from github of this:
https://github.com/dpallot/simple-websocket-server
Right, that's strange, but I have a safe-ish firewalled area to test it in.
The first thing I noticed is that simply importing that SimpleWebSocketServer immediately opened an https server publicly.
from .SimpleWebSocketServer import *
And one of those imports is
SimpleHTTPSServer.py
:YSK this even opens an https server when opened with jedi from within vim for doing syntax checking. That's unnerving.
I changed it to this, just to test the plugin (which I'm using right now).
Even so, I still got the firewall warning with a pseudo-random port. So I took a look at vim-ghost.
In
ghost.py
(under rplugin/python3) lines94-110
:Again, unless you intend to let people on other machines edit your posts in McDonald's or Starbucks, you really do not want top open a public web socket. I'm not sure how windows does it, but if you open an unbound socket and don't allow it with the firewall, it blocks it for localhost as well. That means it's either insecure, or will not work. That's probably not a good idea.
I changed the code on my copy (that I'm using now) like so: (and got rid of that pesky firewall warning for Python.app)