9001 / 9001/copyparty

Confusing behavior when using --ah-cli to generate hashes for another environment

Open
#408 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
46.6k
Forks
1.9k
Avg merge
10d 16h
Merged PRs (30d)
5

Description

A lot of people seem to trip over the fact that in docker or systemd environments, the naive use of `--ah-cli` will produce incorrect hashes, due to the expectation that it will have access to the same generated `ah-salt`.

This can be solved by improving the documentation, but I am not certain what's the best solution here. So far I've been suggesting the following process:
1. add `show-ah-salt` to `[global]` section in the config
2. restart copyparty
3. check the log for a line that looks like `effective ah_salt is O4nO7p1ACFnuFk/EpcDdDM7H`
4. use the cli again to generate a password hash, using the same salt: `copyparty-sfx.py --ah-cli --ah-alg argon2 --ah-salt [ah_salt_you_saw_in_the_log]`

The alternative way could be to suggest setting `$XDG_CONFIG_HOME` in the call to `--ah-cli`, but the actual location seems to vary a lot depending on which systemd service implementation or docker is used. The file might also not be readable by the current user, making it not so straightforward.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.