Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-29 Thread Jason A. Donenfeld
On Thu, Nov 28, 2019, 22:28 Tobias Girstmair wrote: > On Thu, Nov 28, 2019 at 10:15:24PM +0100, Allan Odgaard wrote: > > I don’t know what the above is, but that does not use `eval` and it > > apologies for the noise; it does indeed say 'exec' and not 'eval'. > > as to not make this message a

Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-28 Thread Tobias Girstmair
On Thu, Nov 28, 2019 at 10:15:24PM +0100, Allan Odgaard wrote: I don’t know what the above is, but that does not use `eval` and it apologies for the noise; it does indeed say 'exec' and not 'eval'. as to not make this message a complete waste: I've peeked at github's code search and googled

Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-28 Thread Allan Odgaard
On 28 Nov 2019, at 22:00, Tobias Girstmair wrote: On Fri, Nov 29, 2019 at 09:51:42AM +1300, martin f. krafft wrote: That's all I have in /usr/bin here ;) I've got /usr/bin/i3-sensible-editor and it _does_ eval it (not that i have a strong opinion on this topic): for editor in "$VISUAL"

Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-28 Thread Tobias Girstmair
On Fri, Nov 29, 2019 at 09:51:42AM +1300, martin f. krafft wrote: That's all I have in /usr/bin here ;) I've got /usr/bin/i3-sensible-editor and it _does_ eval it (not that i have a strong opinion on this topic): for editor in "$VISUAL" "$EDITOR" nano nvim vim vi emacs pico qe mg jed

Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-28 Thread martin f. krafft
Regarding the following, written by "Jason A. Donenfeld" on 2019-11-28 at 21:25 Uhr +0100: I *don't* agree that it's too risky. Rather, I'm interested in learning if there's precedent for the change before we make it. Can you research how EDITOR is handled elsewhere, please? Debian's

Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-28 Thread Jason A. Donenfeld
On Thu, Nov 28, 2019, 19:44 martin f. krafft wrote: > Regarding the following, written by "Kjetil Torgrim Homme" on 2019-11-28 > at 13:11 Uhr +0100: > > I would write a trivial wrapper ~/bin/vimsecure and use that as my > $EDITOR, or even simpler, use EDITOR=vi :) > > Yeah, I can do that

Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-28 Thread martin f. krafft
Regarding the following, written by "Kjetil Torgrim Homme" on 2019-11-28 at 13:11 Uhr +0100: I would write a trivial wrapper ~/bin/vimsecure and use that as my $EDITOR, or even simpler, use EDITOR=vi :) Yeah, I can do that instead. I agree that my patch may be too risky. Best, --

Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-28 Thread Jason A. Donenfeld
On Thu, Nov 28, 2019 at 1:12 PM Kjetil Torgrim Homme wrote: > > Den 28.11.2019 12:14, skreiv Jason A. Donenfeld: > > Do you have any other examples of EDITOR being eval'd in this manner? > > > > I agree with your skepticism. It is best if pass(1) handles $EDITOR > like other scripts, I'm wary of

Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-28 Thread Kjetil Torgrim Homme
Den 28.11.2019 12:14, skreiv Jason A. Donenfeld: > Do you have any other examples of EDITOR being eval'd in this manner? > I agree with your skepticism. It is best if pass(1) handles $EDITOR like other scripts, I'm wary of breaking other people's setup. I would write a trivial wrapper

Re: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-28 Thread Jason A. Donenfeld
Do you have any other examples of EDITOR being eval'd in this manner? ___ Password-Store mailing list Password-Store@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/password-store

(fwd) [PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-11-27 Thread martin f. krafft
e@lists.zx2c4.com Cc: "martin f. krafft" Subject: [PATCH] Use eval() to shell-parse $EDITOR for pass-edit Message-Id: <20190812052123.21737-1-madd...@madduck.net> X-Spam: no (crm114:16.49 SA:-102.1) X-Justme: from machine in my domain Enables shell-parsing of $EDITOR when execu

[PATCH] Use eval() to shell-parse $EDITOR for pass-edit

2019-08-11 Thread martin f. krafft
Enables shell-parsing of $EDITOR when executing its contents on temporary files during `pass edit`. Previously, trying to invoke e.g. vim with a set of commands, such as ``` vim -c 'set nostmp' ``` would result in `pass` calling ``` execve("/usr/bin/vim", ["vim", "-c", "'set", "nostmp'",