mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cloud storage: rethink the terminology used
Cloud storage makes more sense that remote storage - at least I assume that more people are used to thinking about "storing things in the cloud". Don't use PIN or passphrase, call it a password everywhere. Don't use copy_string() to copy the password - the git credentials routine asserts that password is not NULL, so make sure we at least have a pointer to an empty string here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
97ef9d0ee8
commit
a6b6674780
5 changed files with 31 additions and 33 deletions
|
|
@ -77,7 +77,7 @@ int credential_ssh_cb(git_cred **out,
|
|||
void *payload)
|
||||
{
|
||||
const char *priv_key = format_string("%s/%s", system_default_directory(), "ssrf_remote.key");
|
||||
const char *passphrase = copy_string(prefs.passphrase);
|
||||
const char *passphrase = prefs.cloud_storage_password ? strdup(prefs.cloud_storage_password) : strdup("");
|
||||
return git_cred_ssh_key_new(out, username_from_url, NULL, priv_key, passphrase);
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ int credential_https_cb(git_cred **out,
|
|||
void *payload)
|
||||
{
|
||||
const char *username = "ssrftest";
|
||||
const char *password = copy_string(prefs.passphrase);
|
||||
const char *password = prefs.cloud_storage_password ? strdup(prefs.cloud_storage_password) : strdup("");
|
||||
return git_cred_userpass_plaintext_new(out, username, password);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue