You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't dug into whether the awk command can be tweaked to prevent this, but that's also a possibility. I think the easiest fix is to make this special combination of characters an invalid cookie. Perhaps, the easiest way is to add $, {, or } to the rejected character list.
What are the expected results? To either not hang, or never generate a cookie that causes a hang.
What version of Distillery? 2.1.1
What OS, Erlang/Elixir versions are you seeing this issue on? 1.8.1/20.1
The text was updated successfully, but these errors were encountered:
jesseshieh
pushed a commit
to jesseshieh/distillery
that referenced
this issue
Apr 27, 2020
Basically, the first command does not actually gsub anything which causes the while loop in the awk command to continue forever. I believe this is because interprets the * as a special regex character. Escaping the special character in brackets seems to fix it and then you can see the substitution happens correctly.
Steps to reproduce
Modify the cookie in rel/config.exs to contain
${u*}
somewhere. For example, in my case, the auto-generated cookie looked like thisThen run the following commands
Notice how the command hangs forever with no output.
Verbose Logs
Adding
--verbose
also just hung with no output.Description of issue
It seems that this special combination of characters is a valid generated cookie according to this function.
Later, when we try to fetch the node name, it runs this awk command which never ends.
I haven't dug into whether the awk command can be tweaked to prevent this, but that's also a possibility. I think the easiest fix is to make this special combination of characters an invalid cookie. Perhaps, the easiest way is to add
$
,{
, or}
to the rejected character list.The text was updated successfully, but these errors were encountered: