generate a small amount of entropy to avoid duplicate notifications from essentially simultaneous deliveries.

This commit is contained in:
friendica 2013-12-04 23:54:46 -08:00
parent 04f61dd4a1
commit cc1e906825
3 changed files with 12 additions and 2 deletions

View File

@ -4,6 +4,10 @@ function notification($params) {
logger('notification: entry', LOGGER_DEBUG);
// throw a small amount of entropy into the system to breakup duplicates arriving at the same precise instant.
usleep(mt_rand(0,10000));
$a = get_app();

View File

@ -127,7 +127,7 @@ function post_init(&$a) {
goaway($desturl);
}
logger('mod_zot: auth request received from ' . $x[0]['xchan_addr'] );
logger('mod_zot: auth request received from ' . $x[0]['hubloc_addr'] );
// check credentials and access
@ -139,7 +139,9 @@ function post_init(&$a) {
$remote_service_class = '';
$remote_hub = $x[0]['hubloc_url'];
$already_authed = ((($remote) && ($x[0]['hubloc_hash'] == $remote)) ? true : false);
// Also check that they are coming from the same site as they authenticated with originally.
$already_authed = ((($remote) && ($x[0]['hubloc_hash'] == $remote) && ($x[0]['hubloc_url'] === $_SESSION['remote_hub'])) ? true : false);
if(! $already_authed) {

View File

@ -16,6 +16,10 @@ function cmtBbClose(comment, id) {
return false;
}
//document.jotpermslock = 'icon-lock';
//document.jotpermsunlock = 'icon-unlock';
$(document).ready(function() {
$('.group-edit-icon').hover(