logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: b430b805c469b33b9862d8f402fa8e63e6bdee8a
parent 366559c5a33c30de181782418cd1b52f65d0ca5a
Author: marcin mikołajczak <git@mkljczk.pl>
Date:   Fri, 11 Aug 2023 16:44:13 +0200

Lint

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>

Diffstat:

Mlib/pleroma/web/common_api/utils.ex3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex @@ -494,7 +494,8 @@ defmodule Pleroma.Web.CommonAPI.Utils do {:error, dgettext("errors", "Too many attachments")} end end - def is_good_locale_code?(code) when is_binary(code), do: code =~ ~r<[A-zA-Z0-9\-]+> + + def is_good_locale_code?(code) when is_binary(code), do: code =~ ~r<^[a-zA-Z0-9\-]+$> def is_good_locale_code?(_code), do: false end