From 799edcb50f746259552df5c08cc2c940ffb0ae43 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 13 Jul 2020 23:51:50 -0400 Subject: [PATCH] add missing source url validation --- lib/philomena/images/image.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/philomena/images/image.ex b/lib/philomena/images/image.ex index ab7f25b2..fae448bc 100644 --- a/lib/philomena/images/image.ex +++ b/lib/philomena/images/image.ex @@ -119,6 +119,7 @@ defmodule Philomena.Images.Image do |> change(first_seen_at: now) |> change(attribution) |> validate_length(:description, max: 50_000, count: :bytes) + |> validate_format(:source_url, ~r/\Ahttps?:\/\//) end def image_changeset(image, attrs) do