Skip to content

Commit de00893

Browse files
committed
refactor: replace :erlang.binary_to_term with Plug.Crypto.non_executable_binary_to_term
1 parent 257af0a commit de00893

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/algora/integrations/github/client.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ defmodule Algora.Github.Client do
7474
case File.read(cache_path) do
7575
{:ok, content} ->
7676
content
77-
|> :erlang.binary_to_term()
77+
|> Plug.Crypto.non_executable_binary_to_term([:safe])
7878
|> maybe_retry()
7979

8080
{:error, _} ->

lib/algora/shared/util.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ defmodule Algora.Util do
2525
def base64_to_term!(base64) do
2626
base64
2727
|> Base.decode64!()
28-
|> :erlang.binary_to_term()
28+
|> Plug.Crypto.non_executable_binary_to_term([:safe])
2929
end
3030

3131
def format_number_compact(number) when is_struct(number, Decimal) do

0 commit comments

Comments
 (0)