From: Alex Gleason Date: Thu, 8 Oct 2020 21:33:47 +0000 (-0500) Subject: Aliases: fix URL regex X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=5ec7d88b77360ed78f75be6b1f94895c3f602972;p=akkoma Aliases: fix URL regex --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index e0252c8ee..d66c92b14 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -51,8 +51,7 @@ defmodule Pleroma.User do # credo:disable-for-next-line Credo.Check.Readability.MaxLineLength @email_regex ~r/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ - # credo:disable-for-next-line Credo.Check.Readability.MaxLineLength - @url_regex ~r/https?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)/ + @url_regex ~r/^https?:\/\/[^\s]{1,256}$/ @strict_local_nickname_regex ~r/^[a-zA-Z\d]+$/ @extended_local_nickname_regex ~r/^[a-zA-Z\d_-]+$/