aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-07 22:55:24 -0700
committerredmatrix <git@macgirvin.com>2016-06-07 22:55:24 -0700
commite46e7002a8945f3156b4c4dcfdedb57316d94ba9 (patch)
tree512a3189e00bf46691d5216bf991c50b7c52b81e /include
parente6d20877b8a836891f072122d0e244a647e3cf27 (diff)
downloadvolse-hubzilla-e46e7002a8945f3156b4c4dcfdedb57316d94ba9.tar.gz
volse-hubzilla-e46e7002a8945f3156b4c4dcfdedb57316d94ba9.tar.bz2
volse-hubzilla-e46e7002a8945f3156b4c4dcfdedb57316d94ba9.zip
block random_profile from accessing sys channels
Diffstat (limited to 'include')
-rw-r--r--include/connections.php3
1 files changed, 2 insertions, 1 deletions
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')
);