re-install: make sure to fetch the latest hubloc in api_auth otherwise authentication might fail

This commit is contained in:
Mario
2022-11-27 09:40:23 +00:00
parent c76f19f19a
commit e87887c328

View File

@@ -102,13 +102,13 @@ function api_login(&$a) {
if ($sigblock) {
$keyId = str_replace('acct:', '', $sigblock['keyId']);
if ($keyId) {
$r = q("select * from hubloc where hubloc_addr = '%s' or hubloc_id_url = '%s'",
$r = q("select * from hubloc where hubloc_addr = '%s' or hubloc_id_url = '%s' order by hubloc_id desc",
dbesc($keyId),
dbesc($keyId)
);
if (!$r) {
HTTPSig::get_zotfinger_key($keyId);
$r = q("select * from hubloc where hubloc_addr = '%s' or hubloc_id_url = '%s'",
$r = q("select * from hubloc where hubloc_addr = '%s' or hubloc_id_url = '%s' order by hubloc_id desc",
dbesc($keyId),
dbesc($keyId)
);