From 3e2a6f0b83acd0126dfd79a175fe53e400ec18a3 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 16 Jun 2020 00:24:42 +0200 Subject: [PATCH] word: validate source values as http urls --- tools/word.pg.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/word.pg.sql b/tools/word.pg.sql index 3c05c38..1bc5dff 100644 --- a/tools/word.pg.sql +++ b/tools/word.pg.sql @@ -17,7 +17,7 @@ CREATE TABLE word ( CHECK (prio >= 0 OR ref IS NOT NULL), grade integer, cover boolean NOT NULL DEFAULT FALSE, - source text, + source text CHECK (source ~ '^https?://'), thumb text[], wptitle text, created timestamptz DEFAULT now(), -- 2.30.0