create update record for accounts on directory server itself during profile changes, re-queue failed directory sync packets, fix account_id index in queue creation, be more selective about updating hubloc_connected (only when we're talking to the associated site). But we still need a way to flag dead accounts and these mechanisms won't cut it, because it isn't a requirement that channels communicate with anybody, except for contacting the directory when the account is created. I think we need to make every channel ping the directory once a month. Then we can find those that have not done so (after syncing with other directories). We can't have the directory just flag dead accounts as this would create a way for an anti-social attacker to become a directory server and mark all the accounts dead.

This commit is contained in:
friendica
2013-10-24 19:38:50 -07:00
parent 3da20b3797
commit 0b0bd3c207
4 changed files with 31 additions and 8 deletions

View File

@@ -118,6 +118,7 @@ function update_directory_entry($ud) {
);
}
}
}
@@ -128,7 +129,7 @@ function syncdirs($uid) {
logger('syncdirs', LOGGER_DEBUG);
$p = q("select channel.channel_hash, channel_timezone, profile.* from profile left join channel on channel_id = uid where uid = %d and is_default = 1",
$p = q("select channel.channel_hash, channel_address, channel_timezone, profile.* from profile left join channel on channel_id = uid where uid = %d and is_default = 1",
intval($uid)
);
@@ -199,6 +200,8 @@ function syncdirs($uid) {
}
}
// TODO send refresh zots to downstream directory servers
$ud_hash = random_string();
update_modtime($ud_hash,$hash,$p[0]['channel_address'] . '@' . get_app()->get_hostname(),1);
}