get_or_fetch won't fetch by nickname if nickname starts with "http"
Something @helene discovered, but I didn't see an issue or MR yet.
See https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/user.ex#L2119-2122
@doc "Gets or fetch a user by uri or nickname."
@spec get_or_fetch(String.t()) :: {:ok, User.t()} | {:error, String.t()}
def get_or_fetch("http" <> _host = uri), do: get_or_fetch_by_ap_id(uri)
def get_or_fetch(nickname), do: get_or_fetch_by_nickname(nickname)
I don't think we allow :
and /
in nicknames, so these should probably be part of the check (e.g. check if it starts with either http://
or https://
).