diff --git a/lib/distillery/lib/cookies.ex b/lib/distillery/lib/cookies.ex index f624c432..7d216d02 100644 --- a/lib/distillery/lib/cookies.ex +++ b/lib/distillery/lib/cookies.ex @@ -31,7 +31,7 @@ defmodule Distillery.Cookies do Stream.unfold(nil, fn _ -> {:crypto.strong_rand_bytes(1), nil} end) |> Stream.filter(fn <> -> b >= ?! && b <= ?~ end) # special when erlexec parses vm.args - |> Stream.reject(fn <> -> b in [?-, ?+, ?', ?\", ?\\, ?\#] end) + |> Stream.reject(fn <> -> b in [?-, ?+, ?', ?\", ?\\, ?\#, ?,] end) |> Enum.take(64) |> Enum.join() |> String.to_atom() diff --git a/test/cases/cookies_test.exs b/test/cases/cookies_test.exs index 3b081619..e1b18d66 100644 --- a/test/cases/cookies_test.exs +++ b/test/cases/cookies_test.exs @@ -23,7 +23,7 @@ defmodule Distillery.Test.CookiesTest do str = Atom.to_string(x) chars = String.to_charlist(str) - with false <- String.contains?(str, ["-", "+", "'", "\"", "\\", "#"]), + with false <- String.contains?(str, ["-", "+", "'", "\"", "\\", "#", ","]), false <- Enum.any?(chars, fn b -> not (b >= ?! && b <= ?~) end), 64 <- byte_size(str) do true