]> git.wh0rd.org Git - tt-rss.git/commitdiff
create_published_article: validate url
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 9 Sep 2012 17:47:58 +0000 (21:47 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 9 Sep 2012 17:47:58 +0000 (21:47 +0400)
include/functions.php

index 701949fd752d55b6d4d65e84bc25dacc0eb84100..65b794dd866ba85844d5302642ab710b76ccedd1 100644 (file)
                if (!$title) $title = $url;
                if (!$title && !$url) return false;
 
+               if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) return false;
+
                $result = db_query($link, "INSERT INTO ttrss_entries
                        (title, guid, link, updated, content, content_hash, date_entered, date_updated)
                        VALUES