-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Can't use eval_password #1359
Comments
Spawn a shell? Where? I'm not a keepassxc user, so I don't know what it actually does. Does it open a new X11 window where you enter your password? Does it want to get it from the terminal using stdio?
Same method works if you just use GPG to encrypt your keys via |
KeepassXC-Cli is taking the entry from the terminal. I don't know if it uses stdio, but you have a prompt in the terminal where you put it.
Where you type your text in profanity. https://profanity-im.github.io/guide/090/basic.html in the input area, "Where commands and messages are entered.". I was thinking about that because keepassxc-cli takes the password from the terminal, as said above. Even if I use something else than keepassxc-cli, I would like to be able to enter my password in the terminal, not having some ncurses interface or some X11 pop-up. |
"takes from terminal" means nothing to me. Neither does "spawn a shell in the input area". |
Ok, let me try again. I don't know if you know basic Python, but when I refer to "a prompt in the terminal" or that it is "taking the entry from the terminal" see it like this in Python: PS: Just've understood what you meant by stdio now, yes that's where keepassxc-cli takes the password from. |
I think I'm going to just test this and see if I'm also getting a freeze! |
I think you will. AFAIK we just open a process to get the password. We don't send anything to it. |
But that screenshot is just pinentry-curses, isn't it? Profanity does the same if you use that. Without a freeze AFAIK. |
Ah, sorry, bad example as Pinentry takes over the TTY. Anyhooooow... I made a small script that solves this by calling Pinentry and passing the password to #!/usr/bin/env bash
db=$1
path=$2
pinentry-curses --ttyname "$(tty)" <<EOF \
| grep D \
| cut -d' ' -f2 \
| keepassxc-cli show "${db}" "${path}" --quiet -sa Password
SETPROMPT Master Password:
GETPIN
EOF Put this in a file somewhere, like keepassxc-pinentry <db> <path> I've tested it with Profanity, with
@TheBrainScrambler does this work for you? :) |
@wstrm Well strangely ... no. I'm getting What I did: |
Have you passed
|
Oh, no, forgot to mention that I directly hardcoded those in the script. And it perfectly works if I run it, as said above: it prints me the right password to stdout. The problem must be elsewhere. |
Is it possible that you run Profanity as another user? Or maybe you have some exotic setup, maybe you could tell me how you run Profanity? I get the same error when the owner of the TTY is different than the current user that is running the script. ~ $ whoami
user1
~ $ ls -l $(tty)
crw--w---- 1 user2 tty 136, 12 Jul 4 11:19 /dev/pts/12 |
I don't have any particular setup, I'm just using Gnome DE with gnome-terminal on Arch Linux |
OK so I think this is the fault of some recent commit. This works when running Profanity 0.8.1, but I get the same error as you on 0.9.5. What version of Profanity are you running @TheBrainScrambler? |
I am currently using the 0.9.2 version |
@wstrm ping |
Did #1459 fix this? |
Most likely works ;) |
I currently have an user, let's call it . The password of this XMPP user is stored in a KeepassXC database, db.kdbx. I want profanity to get this password through the
eval_password
setting from the account.If I do
keepassxc-cli show /path/to/db.kdbx /path/to/password -sa Password
I am granted with a prompt "Enter your password : " so I type it, and it prints the right password. Everything is ok here.Now I enter profanity. I do
/account set <user> eval_password "keepassxc-cli show /path/to/db.kdbx /path/to/password -sa Password"
. Ok no problem. But when I/connect
, profanity just freezes.I thought that profanity would spawn a shell where the prompt appears, then you type the password, and then it is good. But no, actually profanity just freezes because the call to keepassxc-cli expects my password, which I have no way to enter.
Expected Behavior
Profanity should give us a way to interact with prompts spawned by
eval_password
Current Behavior
Profanity just freezes ...
Possible Solution
As stated above, maybe spawn some temporary shell in the entry field. The user wouldn't see any difference, but he would be typing in that shell.
Steps to Reproduce (for bugs)
/account set <user> eval_password "keepassxc-cli show /path/to/db.kdbx /path/to/password -sa Password
/connect
Context
"I want profanity to get this password (the XMPP account's one) through the
eval_password
setting from the account."Environment
profanity -v
Arch Linux
Uh ...
pacman -Qs glib
local/glib2 2.64.2-1
local/glibc 2.31-3
One of the two above I suppose
The text was updated successfully, but these errors were encountered: