QtPass icon indicating copy to clipboard operation
QtPass copied to clipboard

allow arbitrary password generation command

Open edrex opened this issue 8 years ago • 6 comments

I would like to generate passwords using https://pypi.python.org/pypi/xkcdpass/

I tried making a wrapper script that ignores the pwgen args passed, but QtPass seems to check the output and ignore it if it has an unexpected number of characters.

Ask: toggle to just call the supplied pwgen with no args and take the output without validating it.

edrex avatar Feb 20 '17 20:02 edrex

This is something I have been thinking about. And yes, it's something I'd like to see aswel.

I'm waiting for the upcoming release of pass which supports a plugin system and if I recall correctly a straight forward way to select a password generator too.

But if someone else is interested in adding it to 'native' mode already, fee free.

annejan avatar Feb 20 '17 20:02 annejan

Of the programs that could potentially generate password, it seems like the most urgent feature would be to allow having pass generate the passwords.

This would have avoided security issues like #338.

I just posted to the pass mailing list (https://lists.zx2c4.com/pipermail/password-store/2018-January/003166.html) to see if there any road blockers to do so. It would be great if QtPass could be used as truly just a GUI around pass, delegating all important operations to it, including password generation.

nh2 avatar Jan 04 '18 17:01 nh2

The problem here is the compatibility with Windows. QtPass aims to work on Win installations without pass or pwgen, therefore it needs to include a password generator.

jounathaen avatar Jan 04 '18 17:01 jounathaen

it needs to include a password generator

That is OK, as long as as a non-Windows user, I can tell it to use pass (ideally also as the default on non-Windows). I can already tell QtPass to use the pass executable for password storage in the settings, but not yet for password generation.

nh2 avatar Jan 04 '18 18:01 nh2

This used to also be the case, and will be re-instated in 1.2.2

Pull requests are welcome, since I have only minimal time to work on these needed changes myself.

Unfortunately my schedule in 2017 didn't permit me the time QtPass required to maintain, and repeated appeals to gather more maintainers has sofar failed.

annejan avatar Jan 04 '18 18:01 annejan

pass generate not only generates a password but also creates a file and adds it to git. This would be quite complicated to integrate.

As an intermediate solution instead of actually using pass we could emulate pass generation.

The code is here: https://git.zx2c4.com/password-store/tree/src/password-store.sh#n517 (read -r -n $length pass < <(LC_ALL=C tr -dc "$characters" < /dev/urandom) so in the QtPass we could use something similar: cat /dev/urandom | tr -dc 'abc' | fold -w 10 | head -n 1

This would be the "executable" if the pass backend is selected.

lukedirtwalker avatar Mar 16 '18 10:03 lukedirtwalker