PR #4670 merged into devel

8 views
Skip to first unread message

Edward K. Ream

unread,
May 7, 2026, 7:42:48 AM (14 days ago) May 7
to leo-editor
​PR #4670 removes the shell=True kwarg from almost all calls to subprocess.Popen, including the call within g.execute_shell_commands. As discussed in the PR, these are breaking changes to Leo's scripting API.

This pattern persisted because I foolishly cut and pasted code over the years. Now I know better: Leo's code allows shell=True only where the to-be-executed code contains static calls to Windows console commands.
This PR fixes various potential security holes. The at_produce.py, mime.py, and run_nodes.py plugins were especially concerning.

As I write this, I see another possible security vulnerability. Suppose somebody starts a long-running Leo server (leoserver.py). How does that server guard against malicious scripts? Any comments?

Please continue testing the "devel" branch!

Edward

Reply all
Reply to author
Forward
0 new messages