diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-01-21 01:16:41 +0100 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-01-21 01:16:41 +0100 |
commit | f94cc6d824cb2bdf4a41bc800d2bfc7d4f4dc23d (patch) | |
tree | b9a70fa5d9825c04a76513263e7827784495e382 /lib/mix/tasks/pleroma/instance.ex | |
parent | 5803672ae5c66f08ecec2d1e850cb4b4ccea3474 (diff) | |
download | pleroma-f94cc6d824cb2bdf4a41bc800d2bfc7d4f4dc23d.tar.gz |
Mix.Tasks.Pleroma.Instance: Generate signing_salt
Closes: https://git.pleroma.social/pleroma/pleroma/issues/533
Diffstat (limited to 'lib/mix/tasks/pleroma/instance.ex')
-rw-r--r-- | lib/mix/tasks/pleroma/instance.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mix/tasks/pleroma/instance.ex b/lib/mix/tasks/pleroma/instance.ex index 0a2c891c0..1ba452275 100644 --- a/lib/mix/tasks/pleroma/instance.ex +++ b/lib/mix/tasks/pleroma/instance.ex @@ -105,6 +105,7 @@ defmodule Mix.Tasks.Pleroma.Instance do ) secret = :crypto.strong_rand_bytes(64) |> Base.encode64() |> binary_part(0, 64) + signing_salt = :crypto.strong_rand_bytes(8) |> Base.encode64() |> binary_part(0, 8) {web_push_public_key, web_push_private_key} = :crypto.generate_key(:ecdh, :prime256v1) result_config = @@ -120,6 +121,7 @@ defmodule Mix.Tasks.Pleroma.Instance do dbpass: dbpass, version: Pleroma.Mixfile.project() |> Keyword.get(:version), secret: secret, + signing_salt: signing_salt, web_push_public_key: Base.url_encode64(web_push_public_key, padding: false), web_push_private_key: Base.url_encode64(web_push_private_key, padding: false) ) |