diff --git a/CHANGELOG.md b/CHANGELOG.md index a3aaf2d..14bb69e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ # Changelog -## 3.1.0 (2023-09-24) +## 3.2.0 (2023-09-24) - Strict mode: Exception messages of _thrown_ exceptions are now redacted by default to avoid data unintentionally leaking into logs. This behaviour change is not considered to be breaking backwards compatibility since source data presented in exeption messages is not considered part of the `CSV` public API. +- Strict mode: Exception messages can be unredacted using the `unredact_exceptions` option +- Normal mode: Error messages can be redacted using the `redact_errors` option - Option to (un)redact exception messages [contributed in [#122](https://github.com/beatrichartz/csv/pull/124) by [@taylor-redden-papa](https://github.com/taylor-redden-papa) ## 3.0.5 (2022-12-03) diff --git a/README.md b/README.md index cbe9334..a7278b4 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ Add ```elixir -{:csv, "~> 3.1"} +{:csv, "~> 3.2"} ``` to your deps in `mix.exs` like so: ```elixir defp deps do - [{:csv, "~> 3.1"}] + [{:csv, "~> 3.2"}] end ``` @@ -142,9 +142,9 @@ occur, aborting the operation: File.stream!("data.csv") |> CSV.decode! ```` -Redact data in exceptions that `decode!` throws to avoid potentially sensitive data showing up in logs: +Unredact source data in exceptions that `decode!` throws: ```elixir -File.stream!("data.csv") |> CSV.decode!(redact_exception: true) +File.stream!("data.csv") |> CSV.decode!(unredact_exceptions: true) ``` @@ -177,6 +177,12 @@ Unescape formulas that have been escaped: stream |> CSV.decode(unescape_formulas: true) ```` +Redact source data in error tuples producted by decode: + +````elixir +stream |> CSV.decode(redact_errors: true) +```` + ### Encoding diff --git a/mix.exs b/mix.exs index 4942657..7681d9d 100644 --- a/mix.exs +++ b/mix.exs @@ -6,7 +6,7 @@ defmodule CSV.Mixfile do def project do [ app: :csv, - version: "3.1.0", + version: "3.2.0", elixir: "~> 1.5", deps: deps(), package: package(),