[go: up one dir, main page]

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

receive password prompt when hovering over line which contains password #65

Open
gekoke opened this issue Mar 15, 2024 · 5 comments
Open

Comments

@gekoke
Copy link
gekoke commented Mar 15, 2024

When hovering a line that is part of a commit and includes the word password (not sure of the exact heuristic), I receive a password prompt.

This only happens when blamer-enable-async-execution-p is set to t.

Can replicate by having a committed line with the following contents:

  - password:
@Artawower
Copy link
Owner

Thanks for the bug report. Fixed in 0.8.6

@alexmurray
Copy link

Hmm I wonder if there is a larger issue here - it feels like the line of text in the buffer is getting interpreted by emacs/async etc in some way - I wonder if it is possible to get command execution via an untrusted buffer through this issue? Whilst the current fix stops async prompting for a password, I fear async may be invoking emacs with a command that is derived from text of the current line.

@gekoke
Copy link
Author
gekoke commented Apr 15, 2024

I agree - though I'm not proficient enough in Elisp to understand what's going on, I don't feel like the proposed fix of setting (async-prompt-for-password nil) and calling (ignore async-prompt-for-password) is enough to solve the problem in the general case. I don't think this kind of interpreting of the buffer contents should really be possible in the first place.

@Artawower
Copy link
Owner

I couldn't find any code from the emacs-async package that interprets the result buffer as code. It looks like there is a simple regexp that checks if the output of a command matches the tramp-password-prompt-regexp variable.
Of course this is a superficial check, if someone can reproduce potential vulnerabilities I'll check them more thoroughly.

@alexmurray
Copy link

ah ok - thanks - yep I agree, the input string is not actually interpreted in anyway - just matched against - so there doesn't appear to be any risk here of command injection etc. Thanks for clarifying this for me and your work on blamer @Artawower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants