From 88a68b941ff2c8295ac5a6f221855bc4940ddb40 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 25 Oct 2016 18:27:32 -0700 Subject: put all dns checking into one function, allow it to be ignored --- Zotlabs/Module/Regdir.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Zotlabs/Module/Regdir.php') diff --git a/Zotlabs/Module/Regdir.php b/Zotlabs/Module/Regdir.php index 48a7cc16d..208a2b384 100644 --- a/Zotlabs/Module/Regdir.php +++ b/Zotlabs/Module/Regdir.php @@ -54,8 +54,7 @@ class Regdir extends \Zotlabs\Web\Controller { if ($url) { $m = parse_url($url); - if ((! $m) || ((! @dns_get_record($m['host'], DNS_A + DNS_CNAME + DNS_PTR)) && (! filter_var($m['host'], FILTER_VALIDATE_IP) ))) { - + if ((! $m) || (! z_dns_check($m['host']))) { $result['message'] = 'unparseable url'; json_return_and_die($result); } -- cgit v1.2.3 From c1c96e01fab131dd48cd68cdd9b63639e269d9c8 Mon Sep 17 00:00:00 2001 From: Florian Steinel Date: Thu, 27 Oct 2016 02:41:32 +0200 Subject: sql: limit 1 for UPDATE and DELETE is not supported by the SQL standard and postgresql (see: https://www.postgresql.org/message-id/flat/1291109101.26137.35.camel%40pcd12478 ) --- Zotlabs/Module/Regdir.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Regdir.php') diff --git a/Zotlabs/Module/Regdir.php b/Zotlabs/Module/Regdir.php index 208a2b384..f4d16c562 100644 --- a/Zotlabs/Module/Regdir.php +++ b/Zotlabs/Module/Regdir.php @@ -70,7 +70,7 @@ class Regdir extends \Zotlabs\Web\Controller { if(! $result['success']) $valid = 0; - q("update site set site_valid = %d where site_url = '%s' limit 1", + q("update site set site_valid = %d where site_url = '%s'", intval($valid), strtolower($url) ); -- cgit v1.2.3