Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Ensure that `User.password_strength/1` always returns a value (#3389)

Adrian Gruntkowski296637dc18d1
diff --git a/lib/plausible/auth/user.ex b/lib/plausible/auth/user.ex
index 085d124fc5..e75b88ff83 100644
--- a/lib/plausible/auth/user.ex
+++ b/lib/plausible/auth/user.ex
@@ -122,6 +122,9 @@ defmodule Plausible.Auth.User do
%{suggestions: [], warning: "", score: 3}
end
end
+ catch
+ _kind, _value ->
+ %{suggestions: [], warning: "", score: 3}
end
defp validate_password_strength(changeset) do