block random_profile from accessing sys channels

This commit is contained in:
redmatrix 2016-06-07 22:55:24 -07:00
parent e6d20877b8
commit e46e7002a8

View File

@ -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')
);