aboutsummaryrefslogtreecommitdiffstats
path: root/mod/ping.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-22 16:01:07 -0700
committerfriendica <info@friendica.com>2012-05-22 16:01:07 -0700
commite70573f34cb6729f45cb020ee9349c8ff948ff3b (patch)
tree7ee57452f2a5a578a03dc75858d201b6b4929a61 /mod/ping.php
parent3ce06caeed2e817fe401c4d8283beea17d8a34e4 (diff)
downloadvolse-hubzilla-e70573f34cb6729f45cb020ee9349c8ff948ff3b.tar.gz
volse-hubzilla-e70573f34cb6729f45cb020ee9349c8ff948ff3b.tar.bz2
volse-hubzilla-e70573f34cb6729f45cb020ee9349c8ff948ff3b.zip
if identity (uid) changes - reload any other open browser windows on next ping.
Diffstat (limited to 'mod/ping.php')
-rw-r--r--mod/ping.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/mod/ping.php b/mod/ping.php
index 63aaa0f45..55dcb26bb 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -10,8 +10,16 @@ function ping_init(&$a) {
<result>";
$xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
+
if(local_user()){
+ // Different login session than the page that is calling us.
+
+ if(intval($_GET['uid']) && intval($_GET['uid']) != local_user()) {
+ echo '<invalid>1</invalid></result>';
+ killme();
+ }
+
$firehose = intval(get_pconfig(local_user(),'system','notify_full'));
$t = q("select count(*) as total from notify where uid = %d and seen = 0",