Skip to content

Use backticks in Elixir code in 5-elixir.livemd #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/5-elixir.livemd
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ Deserialization of untrusted input can result in atom creation, which can lead t

### Prevention

* Use the :safe option when calling `:erlang.binary_to_term/2` on untrusted input (should be familiar from atom exhaustion 😀)
* Use the `:safe` option when calling `:erlang.binary_to_term/2` on untrusted input (should be familiar from atom exhaustion 😀)
* Prevent function deserialisation from untrusted input, e.g. using `Plug.Crypto.non_executable_binary_to_term/1,2`

### Resource
@@ -191,7 +191,7 @@ By using expressions that do not use boolean coercion, the incorrect assumption
* Prefer `or` over `||`
* Prefer `not` over `!`

The latter will raise a "BadBooleanError" when the function returns :ok or {:error, \_}. In the interest of clarity it may even be better to use a case construct, matching explicitly on true and false.
The latter will raise a `BadBooleanError` when the function returns `:ok` or `{:error, _}`. In the interest of clarity it may even be better to use a case construct, matching explicitly on true and false.

### Resources