Use encryption
This commit is contained in:
parent
71b7c4f23d
commit
0a5066ebce
@ -569,11 +569,13 @@ class Command(CryptMixin, BaseCommand):
|
|||||||
value=manifest_record["fields"][field],
|
value=manifest_record["fields"][field],
|
||||||
)
|
)
|
||||||
|
|
||||||
elif MailAccount.objects.count() > 0:
|
elif (
|
||||||
|
MailAccount.objects.count() > 0
|
||||||
|
or SocialToken.objects.count() > 0
|
||||||
|
or Token.objects.count() > 0
|
||||||
|
):
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
self.style.NOTICE(
|
self.style.NOTICE(
|
||||||
"You have configured mail accounts, "
|
"No passphrase was given, sensitive fields will be in plaintext",
|
||||||
"but no passphrase was given. "
|
|
||||||
"Passwords will be in plaintext",
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -97,6 +97,22 @@ class CryptMixin:
|
|||||||
"model_name": "paperless_mail.mailaccount",
|
"model_name": "paperless_mail.mailaccount",
|
||||||
"fields": [
|
"fields": [
|
||||||
"password",
|
"password",
|
||||||
|
"refresh_token",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"exporter_key": "social_tokens",
|
||||||
|
"model_name": "socialaccount.socialtoken",
|
||||||
|
"fields": [
|
||||||
|
"token",
|
||||||
|
"token_secret",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"exporter_key": "auth_tokens",
|
||||||
|
"model_name": "authtoken.token",
|
||||||
|
"fields": [
|
||||||
|
"key",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -971,10 +971,6 @@ class TestCryptExportImport(
|
|||||||
)
|
)
|
||||||
stdout.seek(0)
|
stdout.seek(0)
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
(
|
("No passphrase was given, sensitive fields will be in plaintext"),
|
||||||
"You have configured mail accounts, "
|
|
||||||
"but no passphrase was given. "
|
|
||||||
"Passwords will be in plaintext"
|
|
||||||
),
|
|
||||||
stdout.read(),
|
stdout.read(),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user