From e46e7002a8945f3156b4c4dcfdedb57316d94ba9 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 7 Jun 2016 22:55:24 -0700 Subject: block random_profile from accessing sys channels --- include/connections.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/connections.php b/include/connections.php index d18383fad..2d10b8354 100644 --- a/include/connections.php +++ b/include/connections.php @@ -590,7 +590,8 @@ function random_profile() { for($i = 0; $i < $retryrandom; $i++) { - $r = q("select xchan_url from xchan left join hubloc on hubloc_hash = xchan_hash where hubloc_connected > %s - interval %s order by $randfunc limit 1", + $r = q("select xchan_url from xchan left join hubloc on hubloc_hash = xchan_hash where xchan_addr not like '%s' and hubloc_connected > %s - interval %s order by $randfunc limit 1", + dbesc('sys@%'), db_utcnow(), db_quoteinterval('30 day') ); -- cgit v1.2.3