mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-10 09:45:43 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9783dc45ff | ||
|
|
badbefbade |
@@ -2,6 +2,11 @@
|
||||
|
||||
<!-- changelog -->
|
||||
|
||||
## [v1.56.4](https://github.com/wanderer-industries/wanderer/compare/v1.56.3...v1.56.4) (2025-03-19)
|
||||
|
||||
|
||||
|
||||
|
||||
## [v1.56.3](https://github.com/wanderer-industries/wanderer/compare/v1.56.2...v1.56.3) (2025-03-19)
|
||||
|
||||
|
||||
|
||||
@@ -3,15 +3,11 @@ defmodule WandererApp.Vault do
|
||||
|
||||
@impl GenServer
|
||||
def init(config) do
|
||||
cipher_key = decode_env!("CLOAK_KEY")
|
||||
|
||||
config =
|
||||
Keyword.put(config, :ciphers,
|
||||
default: {
|
||||
Cloak.Ciphers.AES.GCM,
|
||||
tag: "AES.GCM.V1",
|
||||
key: cipher_key,
|
||||
iv_length: 12
|
||||
tag: "AES.GCM.V1", key: decode_env!("CLOAK_KEY"), iv_length: 12
|
||||
}
|
||||
)
|
||||
|
||||
@@ -19,9 +15,8 @@ defmodule WandererApp.Vault do
|
||||
end
|
||||
|
||||
defp decode_env!(var) do
|
||||
key = System.get_env(var)
|
||||
if is_nil(key),
|
||||
do: raise("No environment variable found for #{var}"),
|
||||
else: Base.decode64!(key)
|
||||
var
|
||||
|> System.get_env("OtPJXGfKNyOMWI7TdpcWgOlyNtD9AGSfoAdvEuTQIno=")
|
||||
|> Base.decode64!()
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user