From 296637dc18d1411d56f778fad344ccff6ccbbc4c Mon Sep 17 00:00:00 2001 From: Adrian Gruntkowski Date: Tue, 3 Oct 2023 13:32:07 +0200 Subject: [PATCH] Ensure that `User.password_strength/1` always returns a value (#3389) --- lib/plausible/auth/user.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/plausible/auth/user.ex b/lib/plausible/auth/user.ex index 085d124fc..e75b88ff8 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