Skip to content

Commit af382dd

Browse files
remove dangerous dynamic atom creation
1 parent a7a8354 commit af382dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/web_push_elixir.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ defmodule WebPushElixir do
111111
vapid_public_key = url_decode(Application.get_env(:web_push_elixir, :vapid_public_key))
112112
vapid_private_key = url_decode(Application.get_env(:web_push_elixir, :vapid_private_key))
113113

114-
%{endpoint: endpoint, keys: %{p256dh: p256dh, auth: auth}} =
115-
Jason.decode!(subscription, keys: :atoms)
114+
%{"endpoint" => endpoint, "keys" => %{"p256dh" => p256dh, "auth" => auth}} =
115+
Jason.decode!(subscription)
116116

117117
encrypted_payload = encrypt_payload(message, p256dh, auth)
118118

0 commit comments

Comments
 (0)