Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooks (perform custom action on {save,...}) #26

Open
SOwOphie opened this issue May 12, 2017 · 0 comments
Open

Hooks (perform custom action on {save,...}) #26

SOwOphie opened this issue May 12, 2017 · 0 comments
Assignees

Comments

@SOwOphie
Copy link
Owner

This is rather trivial to implement, and would be very helpful for e.g. LaTeX files.

Security implications: Worst case scenario: echo '*: --on-save adduser -G wheel evil' >.local.wsconf, a world-writable directory could be exploited to gain root access if a sufficiently priviledged user trips over the config file. While this is no problem on single-user machines, I wouldn't want such a ticking time bomb running on my server. Going the ghci / openssl route of only loading config files if their permissions are narrow enough is overly restrictive, and only requiring it for files containing hooks is unfeasible because of the way config files are handled. Putting hooks in extra config files (like .on-save.wsedit) with tight security requirements doesn't allow for hooks to be specified as call parameters, which is orthogonal to how wsedit has been operating thus far and therefore unacceptable. Maybe this can be solved via compile flag?

(A)Synchronous?: Probably we need both approaches, one silent, asynchronous hook and a synchronous one where the output gets displayed somehow and the editor resumes after the hook terminates.

@SOwOphie SOwOphie self-assigned this May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant